12-10-2018 07:24 AM
Hi.
I have a problem with labsql for insert a data into database,can someone tell me what is wrong this this code? Is the sql code error or i need a lab-sql inerset function?
Thanks
Solved! Go to Solution.
12-10-2018 08:00 AM
A typo in the table name? "schoolinifo", instead of "schoolinfo"?
LabVIEW Programming ((make LV more popular, read this)
12-10-2018 09:03 AM
12-10-2018 09:43 AM
No comma before values?
INSERT INTO table_name (column1, column2, column3, ...) VALUES (value1, value2, value3, ...);
12-10-2018 10:28 AM - edited 12-10-2018 10:29 AM
You will need to change the column handling unicode data to nvarchar imo. Is it nvarchar in this case?
I know for a fact that the ado client can handle unicode but it depends on the destination column of the table which dictates a successful insert.
12-10-2018 11:23 PM
Hi
I insert the data in mysql it works but in labview doesn't work with the same sql code.
And also i used the same code for insert the data into access it is also works.
12-11-2018 01:29 AM
@314159ym wrote:
Hi
I insert the data in mysql it works but in labview doesn't work with the same sql code.
The error message says: "You have an error in your SQL syntax; check [...] for the right syntax to use near ' values ( [...] ) ' at line 1"
I don't think you used the very same SQL code in LabVIEW as in MySQL.
12-11-2018 03:56 AM
Does any query work?
On the bottom it reads "select * from schoolinfo". If that works, "insert into schoolinifo" will not work.
LabVIEW Programming ((make LV more popular, read this)
12-11-2018 04:03 AM
Hi
The read query works,but insert not works
I used function "ADO SQL EXCUTE" Is this the right one or has other function i should use
12-11-2018 04:58 AM
I don't know what the function is called (I don't even know what library you use), but usually the insert and select functions require either different functions, or setting in input (get results or something like that).
The insert will not give any results, and if the execute expects results, it will give an error.
LabVIEW Programming ((make LV more popular, read this)