07-29-2015 03:52 AM
I still think you can't use "Date" or "Time" as column names; try putting them in square brackets, too. I'd rename the columns if it was my database.
07-29-2015 04:13 AM
ic, thanks jim. i will change the columns' name to try it out. Jim i have a questions. My value data of Date, Time, and Wind Speed are logged and get the output from concatenate string. as pic below
The output of the concatenate string would be Date[Tab]Time[Tab]Wind Speed , can i also store the value of Date into 1 variable like a, data of Time into 1 variable like b, and data of Wind speed into 1 variable like c. den i can just INSERT INTO wind_speed_data ( column1,column2,column3 ) VALUES ( a, b, c) . is tis can method works?
My program is log wind speed data every 1 minute, and write it into a text file. this part is done, but im requested to save the logged data into mysql database too instead of text file only. im stuck at tis part @.@...
07-29-2015 04:48 AM
You need to wire the values you put into your concatenate string to the inputs of the format into string. At the moment you have controls so it will insert the data from the controls on your front panel ('Date', 'Time', 'Wind Speed').
At the moment your controls are empty so you are writing empty data.
07-29-2015 05:06 AM - edited 07-29-2015 05:08 AM
07-29-2015 09:30 PM
Thanks sam and jim. I will gv it a try ! Jim, its a formula given by my teacher. Have to 4lo. 😞
07-30-2015 01:23 AM
Now my connection is as below.
And it shows tis thing out. DateTime Error.
I change my column in mysql to A B C first to try out... ( A - Date, B - Time, C - Wind Speed)
07-30-2015 02:31 AM - edited 07-30-2015 02:48 AM
You need to format the datetime into a valid string to insert into the database that it understands. Try something like YYYY/MM/DD HH:MM:SS (it might be '-' instead of '/').
The clue is in the error message.
07-30-2015 02:50 AM
ok noted.! thanks you sam 😄
07-30-2015 07:27 AM
07-30-2015 08:35 AM
@mikeporter wrote:
Do you give names to your VIs like that?
Mike...
Mine are named Untitled 1.vi, Untitled 2.vi ... Untitled 33.vi