Wonderware Intouch SQL Access Manager

I have a wonderware standalone HMI collecting process data from our production line. I am writing those values to a database in MySQL, though I did start playing with it in MS Access at first.

The problem is the two different insert options.

When I use the SQLInsert function, no errors, everything works fine. When I use the SQLInsertPrepare and SQLInsertExecute functions, it gives me item cannot be found in the requested ordinal error.

This is the script I am using for the insert by itself that works without problem

ResultCodePreparL1O = SQLInsert(Quad_Connection, "STR1_Overview_Report" , "STR1_Overview");

ResultCodePreparL1B = SQLInsert(Quad_Connection, "STR1_Bronx_Report" , "STR1_Bronx" );

ResultCodePreparL1N = SQLInsert(Quad_Connection, "STR1_NDT_Report" , "STR1_NDT");


And this is the script I am using for the insert prepare and execute that is giving me errors

ResultCodePreparL1O = SQLInsertPrepare(Quad_Connection, "STR1_Overview_Report" , "STR1_Overview" , STR1_OV_State);
ResultCodeInsertL1O = SQLInsertExecute(Quad_Connection, "STR1_Overview" , STR1_OV_State);
ResultCodeEndL1O = SQLInsertEnd(Quad_Connection, STR1_OV_State);

ResultCodePreparL1B = SQLInsertPrepare(Quad_Connection, "STR1_Bronx_Report" , "STR1_Bronx" , STR1_Bronx_State);
ResultCodeInsertL1B = SQLInsertExecute(Quad_Connection, "STR1_Bronx" , STR1_Bronx_State);
ResultCodeEndL1B = SQLInsertEnd(Quad_Connection, STR1_Bronx_State);

ResultCodePreparL1N = SQLInsertPrepare(Quad_Connection, "STR1_NDT_Report" , "STR1_NDT" , STR1_NDT_State);
ResultCodeInsertL1N = SQLInsertExecute(Quad_Connection, "STR1_NDT" , STR1_NDT_State);
ResultCodeEndL1N = SQLInsertEnd(Quad_Connection, STR1_NDT_State);

I get the same error and success in both MySQL and Access with these different scripts.

I am thinking it has to be something in the table name and bindlist, but I dont understand how it works just fine with the straight insert command.

**Edit**
Also, the prepare and end commands return with no errors. It is the InsertExecute command that is giving the actual error.
 
Hi tgulch,

I have a similar issue with Intouch 2023 R2. Under Windows Server 2022 with SQL Express.
SQLSelect or SQLUpdate won't work, however SQLInsert through no errors and inserts data into the table properly as expected.

Were you able to solve it?
 

Similar Topics

Dear Aveva / Wonderware Intouch Experts, I'm new in InTouch server/client configuration or modifications, so I need your valuable help on the...
10
Replies
2,385
Views
Hi All, I currently looking to set up Wonderware Intouch 2014 R2 v 11.1.08 to SQl Data Base For logging alarms, I keep getting An error when I...
2
Replies
4,672
Views
I want to display the results from a SQL SELECT statement inside intouch. Looking for some kind of example as the SQL Access Manager doc is not...
6
Replies
14,340
Views
Dear all, I have a problem when migrating wonderware Intouch from touchscreen panel to desktop. I can't connect to database when using intouch in...
0
Replies
3,242
Views
Hello All, I am trying to connect to a server using Distributed Name Manager and assigning InSQL Provider for trending purposes. I've set up the...
1
Replies
4,061
Views
Top