citect scada and sql

salamplc

Member
Join Date
Jan 2019
Location
ir
Posts
9
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 does not show on textbox.please say your idea for me.





INT
FUNCTION
GetNames()
INT hSQL;
STRING sName;
INT Status;

hSQL = SQLConnect( "DSN=impaytere_ss" );
IF hSQL <> -1 THEN
Status = SQLExec( hSQL,"SELECT CNAME FROM FETISH WHERE SURNAME = 'Jumpy' " );
IF Status = 0 THEN
WHILE SQLNext( hSQL ) = 0 DO
sName = SQLGetField( hSQL, "CNAME" );

// whatever you wish to do with this data...

END;
SQLEnd( hSQL );

ELSE
Message( "Error", SQLErrMsg(), 48 );
END;

ELSE
Message( "Error", SQLErrMsg(), 48 );
END;
RETURN sName
SQLDisconnect( hSQL );
END
 

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
17
Views
5,470
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,006
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
299
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
368
Back
Top Bottom