citect scada and sql

citect scada

You need to change the SQLExec to this I think

SQLExec(hSQL, "SELECT * FROM FETISH WHERE SURNAME = 'Jumpy'");
If SQLNext(hSQL) = 0 Then
sName = SQLGetField( hSQL, "CNAME" );

END
hi
thank you for your reply
i tested this command but i could not get data from database and did not show it in textbox
 
Did you check your DSN? Go to Control Panel -> Administrative Tools -> ODBC Data Sources (32-bit then 64-bit) and...

Check that the "impaytere_ss" exists either under User DSN or System DSN, and that all the properties are correct.
 
I assume your error handling is working or you would get an error, Can you step through the code by creating a breakpoint, most VB code has a facility where you set a breakpoint (usually highlighted in brown), run code until breakpoint then step through (usually F8). If you step through then see if it actually goes into the GetField and see if anything appears in the Sname, There are a few scenarios, It is not finding the Surname, The variable SName is not tied to the citec field, the code is bypassing the getField etc.
I ran the code in SQLServer Express as a query and it worked.
 

Similar Topics

hi. I want to connect to sql server and i get data from it and i show it on textbox in citect scada 2018.i have this code for this task.data...
Replies
1
Views
1,613
Hello all! I am new in Citect SCADA. I need to create material tracking system in which I have a dozen of photometric sensors. When each sensor...
Replies
1
Views
3,005
So i've been at this for a long while, i have Citect Scada 2018, i have full access to everything but i can't seem to find any option or...
Replies
0
Views
52
I am trying to display a variable within a cicode function onto a graphics page. This function queries a SQL database. I can get the value onto a...
Replies
3
Views
298
We are trying to set up a newer generation Omron PLC (NX/NS Series) with Citect / Aveva Plant SCADA using the Ethernet/IP CIP Protocol to read...
Replies
2
Views
366
Back
Top Bottom