|
|
Databases and Drivers
Started by jcbcn at 08-06-2008 12:03 AM. Topic has 1 replies.
 
 
|
|
Sort Posts:
|
|
|
|
08-06-2008, 12:03 AM
|
jcbcn
Joined on 08-05-2008
Posts 1
|
Connecting Clarion with MySQL
|
|
|
|
|
Hello !!!
I have a big problem!
I tried to explain it:
I work with Clarion 5.5G and MSACCESS databases.
I have many programs using this duo clarion-MSACCESS connected with ODBC connections it works perfectly.
I like to change my MSACCESS database to MYSQL 5.0 database, but I have a problem, a little example: when I select a client I blocked this client for security and use a this code to make this process:
CLOSE(TABLE_BLOCK)
OPEN(TABLE_BLOCK)
CLEAR(TABLE_BLOCK)
TABLE_BLOCK{Prop:SQL}='SELECT MAX(Id) from TABLE_BLOCK' NEXT(TABLE_BLOCKS) IF ERRORCODE() OR BLO:Id=0 THEN BLO:Id = 1 ELSE BLO:Id += 1 END
BLO:NoUser = GLO:Use BLO:NoModule = GLO:NoModule BLO:Register = CLIP(Client_Register) BLO:Date = today() BLO:Time = clock()
ADD(TABLE_BLOCKS) IF ERRORCODE() THEN message('ADD |'&error()&'|'&errorcode()&'|'&errorfile()&'|'&fileerror()&'|'&fileerrorcode()) END
RETURN BLO:Id
CLOSE(TABLE_BLOCK)
I record (ADD) the user number, module number, client register, date and time,
Note: I OPEN and CLOSE the table because a used a Procedure.
When I run the program and select a register for the browser of the table CLIENT, show this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near "TABLE_BLOCK"('ID','NOUSER','NOMODULE','REGISTER','DATE','TIME') VALUES at line 1
And after then, I selected another register from other browser and table assign, show this error:
Record Retrieval Error
Error (You have an error in your SQL syntax: check the manul that corresponds to your MySQL server version for the right syntax to use near "CLIENT"A WH) attempting to access a record from the CLIENT file. Returning to previous window.
I use this values for the data types of clarion and mysql:
Clarion Type Picture MySQL Type LONG @n10_ INT(10) CTRING(41) @s40 VARCHAR(40) REAL @n10`2 DOUBLE (15,5) DATE @D6 DATETIME TIME @T8 TIME BYTE @n3 TINYINT(3)
I forget, I used the program MYSQL Migration Toolkit, for emigration of data to MSACCESS to MySQL.
I don´t know what could be happen, I like to some help.
Thanks, Sorry for my english
JC :P
JC :P
|
|
|
|
|
Report
|
|
|
|
08-17-2008, 5:06 AM
|
samir
Joined on 05-21-2008
Posts 28
|
Re: Connecting Clarion with MySQL
|
|
|
|
|
Hello,
Date and time fields are defined as a string,group,date,time sequence. Redefine your date and time fields. That's it.
Regards.
Samir
|
|
|
|
|
Report
|
|
|
|
|
|