Citect 7.0 Connect ODBC Excel...

devker

Member
Join Date
Apr 2007
Location
Pohang
Posts
11
I try connect Citect 7 ODBC Excel..

STRING FUNCTION getCoilSelect()
INT hSQL;
STRING sName;
INT Status;
hSQL = SQLConnect("Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=d:\somepath\coil_data.xls;DefaultDir=d:\somepath");
IF hSQL <> -1 THEN
Status = SQLExec(hSQL, "SELECT ThickNess FROM [sheet$]");
IF Status = 0 THEN
WHILE SQLNext(hSQL) = 0 DO
sName = SQLGetField(hSQL, "ThickNess");
SQLEnd(hSQL);
END
ELSE
Message("Error", SQLErrMsg(), 48);
END
SQLDisconnect(hSQL);
ELSE
Message("Error", SQLErrMsg(), 48);
END
RETURN sName;
END

("Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=d:\somepath\coil_data.xls;DefaultDir=d:\somepath"

This is to use a DSN-less connection string to connect to the database and using UNC path in the connection string when using SQLConnect().

What is wrong?
 
Last edited:

Similar Topics

Hello Everyone I working in power plant and we using citect 7.20 , how we can connect citect to mysql to show some system info on website or...
Replies
1
Views
1,488
I have any trouble about connection from SQL Database server with Vijeo Citect version 7.20, I've made a database in Microsoft SQL Server, and I...
Replies
2
Views
4,630
Hello Expert, I am focusing on a job that will interface Modicon M340 Citect and Plc version 7.4. I have examined my PLC program which is working...
Replies
1
Views
2,172
Hello Expert, I am working on a project that will interface Modicon M340 Plc and Citect version 7.4. I have tested my PLC program and it is...
Replies
2
Views
2,998
Hello EveryOne...!!! Please Let me Know if this could be possible..!!! I want to connect twido suite 2.2 and Citect scada over local address of...
Replies
0
Views
1,789
Back
Top Bottom