minhtham Posted May 25, 2016 Share Posted May 25, 2016 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 More sharing options...
minhtham Posted May 25, 2016 Author Share Posted May 25, 2016 myObject = new(MyClassType) QueryToClass(dshandle, "SELECT Name, Address FROM myTable", myObject) "MyClassType" What is defined? Link to comment Share on other sites More sharing options...
AzeoTech Posted May 25, 2016 Share Posted May 25, 2016 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 More sharing options...
minhtham Posted May 26, 2016 Author Share Posted May 26, 2016 i can't read data type "text",it is retune whole is" 0" how to read it?? Link to comment Share on other sites More sharing options...
AzeoTech Posted May 26, 2016 Share Posted May 26, 2016 Which release of DAQFactory are you running? And are you using MSSQL or MySQL? Link to comment Share on other sites More sharing options...
minhtham Posted May 26, 2016 Author Share Posted May 26, 2016 I did it! thanks...... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.