read data from mysql database


Recommended Posts

i have a problem when i read data from mysql.

when i used "global qr = db.Query(dbase,"SELECT name FROM alarmlog limit 100;")" ,it is no problem.

but    i used  "     global qr = db.Querytoclass(dbase,"SELECT name FROM alarmlog limit 100;")",DAQ is close.


Link to comment
Share on other sites

For the first post: MySQL or MSSQL?  Also, does it crash if you drop the "limit 100"?  I can't seem to reproduce.  Also, what release of DAQFactory?

For the second part, MyClassType would be a class that you had defined.  In general you do not need to give QueryToClass an object.  It will create one with member variables for all the fields and a few extras (fieldnames, etc.).  But if you want this data injected into a class that you created that might have a bunch of member functions, then you would want to pass an instantiated object of that class.


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.