Member Login
Search
Jump to a Date
Sponsored Communities
Cool stuff
Neat Stuff

Visit our shop for nerds in control lifestyle products.
Thermal Overload
The threads that wouldn't die...
- PC reliability?
- Windows, real time
- PID loops
- PCs vs. PLCs
- Replacing people
- MS 'monopoly'?
- Software quality
- Where do we go from here?
- Why pay?
- PC reliability?
- Windows, real time
- PID loops
- PCs vs. PLCs
- Replacing people
- MS 'monopoly'?
- Software quality
- Where do we go from here?
- Why pay?
Fortune
"If you have to hate, hate gently"
RSS Feed
www.control.com/rss/
To get a personalized feed, become a member at no cost.
Hello,
I would like to know if somebody could help me with the problem I have to communicate with a mySQL database.
The ODBC connection is no problem. When I try an SQLExec function the following error occured.
(Descriptor type out of range 307). I looked for the help function and called our distributer for this problem. The couldn't give support because Citect and mySQL is not there thing.
I already read something about it and that Matthew Richardson managed the communication between Citect and mySQL.
I was wondering if somebody could help me?
With best regards,
Alexander van Deurzen
(EXCAMPLE CODE THAT IS USED)
FUNCTION
ListNames()
INT hSQL;
STRING sName;
INT Status;
hSQL = SQLConnect("DSN=ZZL_Standaard;UID=Ditis;PWD=kwasie;SRVR=why" );
IF hSQL <> -1 THEN
Status = SQLExec(hSQL, "SELECT * FROM tblloog");
IF Status = 0 THEN
WHILE SQLNext(hSQL) = 0 DO
sName = SQLGetField(hSQL, "Name");
Message("Data", sName , 48);
END
SQLEnd(hSQL);
ELSE
Message("Er rorStatus", SQLErrMsg() + " " + IntToStr(Status) , 48);
END
SQLDisconnect(hSQL);
ELSE
Message("ErrorS QLconnect", SQLErrMsg(), 48);
END
END
I would like to know if somebody could help me with the problem I have to communicate with a mySQL database.
The ODBC connection is no problem. When I try an SQLExec function the following error occured.
(Descriptor type out of range 307). I looked for the help function and called our distributer for this problem. The couldn't give support because Citect and mySQL is not there thing.
I already read something about it and that Matthew Richardson managed the communication between Citect and mySQL.
I was wondering if somebody could help me?
With best regards,
Alexander van Deurzen
(EXCAMPLE CODE THAT IS USED)
FUNCTION
ListNames()
INT hSQL;
STRING sName;
INT Status;
hSQL = SQLConnect("DSN=ZZL_Standaard;UID=Ditis;PWD=kwasie;SRVR=why" );
IF hSQL <> -1 THEN
Status = SQLExec(hSQL, "SELECT * FROM tblloog");
IF Status = 0 THEN
WHILE SQLNext(hSQL) = 0 DO
sName = SQLGetField(hSQL, "Name");
Message("Data", sName , 48);
END
SQLEnd(hSQL);
ELSE
Message("Er rorStatus", SQLErrMsg() + " " + IntToStr(Status) , 48);
END
SQLDisconnect(hSQL);
ELSE
Message("ErrorS QLconnect", SQLErrMsg(), 48);
END
END
This seems to be an ODBC error message, rather than a mySQL error message. Microsoft says the ODBC error messages are located in the "ODBC Programmer's Reference" documentation (which doesn't seem to be anyplace obvious on their web site).
You might try asking this question on the mySQL lists at:
http://lists.mysql.com/
You might try asking this question on the mySQL lists at:
http://lists.mysql.com/
Do not use * for a lot of fields.
Citect can only return a limited quantity.
MySQL can also have limitations.
We use MySQL with Citect.
No problem with that, but we have added a lot of code so 1 SQL statement at the time is executed.
SQLExec 1
SQLExec 2 (Multithreading)
SQLNext 1 -> Error in descriptors
Best regards, HB
Citect can only return a limited quantity.
MySQL can also have limitations.
We use MySQL with Citect.
No problem with that, but we have added a lot of code so 1 SQL statement at the time is executed.
SQLExec 1
SQLExec 2 (Multithreading)
SQLNext 1 -> Error in descriptors
Best regards, HB
MySQL 5 has a hard limit of 4096 columns, but the actual limit is less depending on the amount of bytes of the columns data type.
http://dev.mysql.com/doc/refman/5.0/en/column-count-limit .html
Sorry, don't know anything about that Citect scripting.
----
Nathan Boeger
http://www.inductiveautomation.com
Total SCADA Freedom
http://dev.mysql.com/doc/refman/5.0/en/column-count-limit .html
Sorry, don't know anything about that Citect scripting.
----
Nathan Boeger
http://www.inductiveautomation.com
Total SCADA Freedom
In reply to Nathan Boeger: 4096 columns is not normally a serious limitation. For most applications, if you have anywhere near that many columns there is something wrong with the database data design.
That is correct. Relational databases typically make more sense taller rather than wide.
From Control Engineering magazine...
Related articles from Control
Engineering magazine- Rockwell Automation releases VantagePoint for plant data visualization
- 14 new high-performance USB data acquisition devices
- New cyber security blog tackles DCS, SCADA vulnerabilities
- Analyzing Critical Flow Measurements
- Get the Most HMI for the Dollar
- Panel meter applications: 3-in. 2U three color touch modules
- Custom-designed, advanced display HMI systems
- Security module addresses government SCADA concerns
- Sun-readable display technology: How it works
- SCADA system upgrades can benefit from new software, hardware
Above articles copyright 2008 Reed Business Information.
Subject to its Terms of Use.
Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2008 Control Technology Corporation. All rights reserved.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Patronize our advertisers!




