LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Toolkit crashes - MySQL

Hi there,
 
I've got a little problem with the SQL Toolkit. I try to use the MySQL Database System. I tried to convert my existing project to use MySQL instead of MS Access. It quite works fine but now I've got a problem in a certain context.
 
Here's the source code:
 
....
 
 Fmt (str_statement, "%s<SELECT * FROM Daten");
 
 hstmt = DBActivateSQL (hdbc, str_statement);
 
 if (hstmt <= 0) goto Error;
 DisableBreakOnLibraryErrors(); 
 
 if ((int_result = DBFetchNext (hstmt)) == DB_SUCCESS)
 {
  retval = TRUE;
 }
 
 int_result = DBDeactivateSQL(hstmt);
....
 
When executing the last line of the above my program crashes with this error message:
 
FATAL_RUNTIME_EROR - ... 'General Protection Fault' at 001B:4CB023BC
 
Did I do something wrong or is any of the used drivers buggy ?
 
My Software components: 
- LW/CVI 8.5 
- SQL Toolkit 2.06
- MySQL 5.0, ODBC Connector 3.51
 
Please Help !
 
 
 
 
0 Kudos
Message 1 of 2
(2,982 Views)
You did'nt create variables to hold the data you return. Check out the samples and follow the flowchart, there's diffirent appraoches to get data, follow one of them and refer to the examples provided.
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 2 of 2
(2,923 Views)