Citect and mySQL

  • Thread starter Alexander van Deurzen
  • Start date
A

Thread Starter

Alexander van Deurzen

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("ErrorStatus", SQLErrMsg() + " " + IntToStr(Status) , 48);
END
SQLDisconnect(hSQL);
ELSE
Message("ErrorSQLconnect", SQLErrMsg(), 48);
END
END
 
M

Michael Griffin

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/
 
H

Heine Broers

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
 
M

Michael Griffin

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.
 
Top