Hello,
I am trying to retrieve MySQL (remote server) data from a 7.1 Intouch Wonderware application running on Windows NT.
I have intalled the ODBC driver version 2.50.19 for MySQL from TCX DataKonsult AB and am able to connect to the remote server (couldn't install newer drivers).
However, whenever I try to execute an SQLSelect function I keep getting an "Invalid Pointer" error. My guess is that I haven´t configured properly the bind list, since I haven't found a tutorial on how to do it.
I just simply matched a tagname with a column name, but I get the feeling that is not correct.
Here's the code that I'm using:
Does anyone have an idea of what I'm doing wrong?
Thanks in advance.
I am trying to retrieve MySQL (remote server) data from a 7.1 Intouch Wonderware application running on Windows NT.
I have intalled the ODBC driver version 2.50.19 for MySQL from TCX DataKonsult AB and am able to connect to the remote server (couldn't install newer drivers).
However, whenever I try to execute an SQLSelect function I keep getting an "Invalid Pointer" error. My guess is that I haven´t configured properly the bind list, since I haven't found a tutorial on how to do it.
I just simply matched a tagname with a column name, but I get the feeling that is not correct.
Here's the code that I'm using:
Code:
ResultCode = SQLConnect(ConnectionID, "MyDSN");
IF ResultCode == -1 THEN
texto = SQLErrorMsg(ResultCode);
ENDIF;
ResultCode = SQLExecute(ConnectionID, "", 0);
ResultCode = SQLSelect(ConnectionID, "MyTable", "MyBindList", "id = 1", "");
IF ResultCode == -1 THEN
texto = SQLErrorMsg(ResultCode);
ENDIF;
ResultCode = SQLEnd(ConnectionID);
ResultCode = SQLDisconnect(ConnectionID);
Does anyone have an idea of what I'm doing wrong?
Thanks in advance.