Search the Community
Showing results for tags 'mysql'.
Found 3 results
hye ..i have a database with data already logging there..i just want the DaqFactory open the database so that i can manipulate the data in DaqFactory. i installed the ODBC 32 bit on my pc and here is the details dsn=DBTesting user=user pssw=pssw database=testing table on the mysql database=my_chart_data and the table contains category value1 value2 7.30 am 23.0 24.5 7.40 am 20.19 21.22 i try logging some random data to the other blank database (testing2) as mention in user guide and it successfully logging. the problem is when i try to open the database and view the data, i keep getting the 01002 error. here are my script for the SEQUENCES; global string DSN global string user global string pssw global string DATABASE private handle private result DSN=DBTesting user=user1 pssw=psswd DATABASE=testing private handle=DB.OpenEx("DBTesting","user1","psswd","testing") private handle=DB.OpenEx("DBTesting") is there any steps that i forgot to configure? tq
I am using the following sequence to query a MySQL db for the Max value of a column. I know the MySQL syntax is correct, the query works with MySQL Admin correctly. Here is what I am using: Sequence--- global dbase global qr dbase = db.OpenEx("DSN=MySQLdb;UID=ssc01;PWD=xxxxxxx;DATABASE=agtest") qr = db.Query(dbase,"Select Max(PwrDmdTotal) from agpower081012") db.CloseQuery(qr) db.Close(dbase) end Sequence--- This is a simple query that should result in the variable qr as 281.554 The result I am getting through the ODBC client and DF is 69033044402.00 This result also changes every time I run the sequence. Seems like I don't have something in the qr = line. What am I doing wrong? -Greg