Citect SQL Problem

hello everyone,
i'm new at citect scada and i use vijeo citect 2015.
and i use mssql 2017. i wrote a cicode to store same values in sql database.But i can't insert real type values. i designed my sql table with real type but i cant insert. i only insert if i design it with nchar() or varchar types.
is there any way to insert real values to sql tables as real type?

my code:
Code:
FUNCTION
INSERT_VAL_TAG( INT tagıd,STRING tagname,REAL value)
INT hSQL;
INT sts;

hSQL=SQLConnect("Driver={SQL Server};Server=MEHMET;Trusted_Connection=Yes; Database=vijeo_test_DB");
IF hSQL <> -1 THEN

sts=SQLExec(hSQL,"INSERT INTO PROCESS1 (TagID,Tag_Name,RValue,TimeTag) VALUES ('"+ IntToStr(tagıd)+"','" + tagname + "','" +RealToStr(value,10,1) + "','" + TimeToStr(TimeCurrent(),10)+ "') ");

SQLDisconnect(hSQL);


ELSE
Message("fail","fail",48);

END
END
 
Top