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,508
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,015
Hello, the system we use is Scada 7.5 series. We have usb key activ now we need additional key to make the system work, how do we solve this...
Replies
0
Views
80
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
90
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
338
Back
Top Bottom