How to use Sql in Intouch

Hello friends, i need to populate an existing Sql table from Intouch.

I Have already wrote a script using SQLInsert() function all ok, but i need to write also a null value .

Into manual i discovered that using SQLInsert() function this is impossible.

I tried to use a separate function like SQLInsertPrepare , SQLSetParamNULL etc.. but nothing to do.
I do not understand how to use this function, the correct sequence of call an how to write a single value of a column of the table.
From the manual or search help on line this is'nt easy to understand. :unsure:


I hope that anyone can help me suggest step by step how to do. Any help is appreciate

Thank you in advance

PLC_ITA
 
I don't know if the document I looked at is entirely up to date, but it mentions that "InTouch does not support null data" even if your SQL table does.
Numeric data is usually never null, but string fields could be defined as allowing null values. The alternative is to set the string to "" (an empty string) but I'm not sure how Intouch would interpret that.
Your Intouch BindList should be the way you interface with the data table, so I suppose you could make a bindlist without the field that you want to leave null, as long as you specified that the field is allowed null values when creating or modifying the data table.
 
Danatomega, thank you for your answer. Today i'm out of office. The manual is dated 2002, but in internet no found other. In any case, also the manual on line ( i use Intouch v10.1) is the same.
As you suggest, intouch does not support the value "null" but only using the SqlInsert (). The manual suggests the use of functions "SQLPrepare," SQLExecute and SetParamNull, if you need to write a column with null values.
There are no examples, so I do not understand how to do to write only a single value in the table
 

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,383
Views
Hi, I have an intouch 9.5 project passing data to a MS SQL 2005, all good so far. I want to upgrade my HMI project to 2014R2, and SQL to 2012, but...
0
Replies
1,470
Views
I've tried following "Wonderware InTouch HMI Supplementary Components Guide" but the value from sql not appear on intouch runtime screen. I...
25
Replies
18,260
Views
Hi, I want to connect the Intouch and MS SQL Server. But now I cannot access the SQL Server into MS SQL Server, the message was showing Invalid...
4
Replies
11,485
Views
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...
1
Replies
4,121
Views
Top