SQL and Citect

  • Thread starter Matthew Richardson
  • Start date
M

Thread Starter

Matthew Richardson

Hello All,

I am trying to work out if citect can write to a SQL
server with integers in real values instead of having to output everthing as a string.

Has anyone managed to be able to acomplish this task as I have read in the DOCS that you can only write out to a SQL server in string format.

Regards Matthew
 
Y

Yosef Feigenbaum

Hello Matthew,

Everything you write to SQL through ODBC is going to have to be in string format. The format of the data in the string indicates to SQL how to store the data.

For example, SQL translates 123 as a number and '123' as a string.

The table format of SQL also determines if the data is saved. Trying to send '123' to a field declared as an int will fail.

Good Luck,

(8{)} ( .)
[email protected]
 
M

Matthew Richardson

Hello Yosef,

Thankyou for the reply, you responce has helped me to understand how the translation takes place. I have now written a bit of CIcode that seems to do the job correctly now. If any one needs a bit of code to use or point them in some sort of direction to start with when using MySQL and Citect I will be only to glad to supply it.

Regards

Matthew Richardson
 
T

Torulf Wiberg

Matthew,

I was contacted by a customer last week regarding saving Citect data to an SQL database. I would be very happy if you could send me your code to use for initial testing.

Regards

/T

-------------------------------------------------------
Torulf Wiberg Tel. +46 (0)411 533 110
Deterministic Control AB Fax +46 (0)703 83 08 08
Karl Kulls väg 6 Mob. +46 (0)70 595 09 97
SE-274 56 Abbekås
SWEDEN
 
hi matthew,

can i have the code too? coz right now i'm trying to connect citect to microsoft access by using odbc to do some sql queries. ae you familar with that?

adelelim
[email protected]
 
Top