Hello,
I'm working with Delphi 6 and the Zeos 6.6 beta.
I've got a table in Mysql 5.0 which has a view fields declared as
enum('N','Y') NOT NULL default 'N'
The Field editor makes Boolean fields from this which is good.
If I insert a row I only want to insert one field with a value all other fields should take the default or stay NULL.
-> ZupdateSQL.INSERTSQL:
INSERT INTO KUNDEN
( KUNDEN.MATCHCODE, )
VALUES
(:MATCHCODE)
I put all the boolean fields to autogenerate (default), and required to false.
If I insert a row I get an EZSQLException in the Zdbcmysqlutils Unit (procedure checkmysqlerror).
Check your syntax near " 0,0,0,0,0,0,0,0,0,0,0,0,0,"
But I only wanted to update one field, why are there that many values.
Can anybody help me.
Thanks in advance
Andreas
ZupdateSQL Boolean fields
Moderators: gto, cipto_kh, EgonHugeist
Hi mdaems,
thats the tracefile:
0:22 cat: Connect, proto: mysql-5, msg: CONNECT TO "asreben" AS USER "root"
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: select *
from KUNDEN left join land
on kunden.land = land.lk
order by kdnr
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: SHOW TABLES FROM asreben LIKE 'KUNDEN'
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: SHOW COLUMNS FROM asreben.kunden LIKE '%'
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: SHOW TABLES FROM asreben LIKE 'land'
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: SHOW COLUMNS FROM asreben.land LIKE '%'
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: SELECT * FROM kundpos
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: SHOW TABLES FROM asreben LIKE 'kundpos'
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: SHOW COLUMNS FROM asreben.kundpos LIKE '%'
2006-12-29 09:10:30 cat: Execute, proto: mysql-5, msg: SELECT ''D'',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'', errcode: 1064, 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 ''',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,''' at line 1
From this 10 lines the first 9 are made when the application starts.
Then I used a tdbnavigator which is connected with a tzquery (first select statement), here I put on the insert Button, but it seems that no SQL statement is made for this.
Afterwards I inserted one field (matchcode) and then went one row forward, then i get this error.
thats the tracefile:
0:22 cat: Connect, proto: mysql-5, msg: CONNECT TO "asreben" AS USER "root"
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: select *
from KUNDEN left join land
on kunden.land = land.lk
order by kdnr
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: SHOW TABLES FROM asreben LIKE 'KUNDEN'
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: SHOW COLUMNS FROM asreben.kunden LIKE '%'
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: SHOW TABLES FROM asreben LIKE 'land'
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: SHOW COLUMNS FROM asreben.land LIKE '%'
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: SELECT * FROM kundpos
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: SHOW TABLES FROM asreben LIKE 'kundpos'
2006-12-29 09:10:22 cat: Execute, proto: mysql-5, msg: SHOW COLUMNS FROM asreben.kundpos LIKE '%'
2006-12-29 09:10:30 cat: Execute, proto: mysql-5, msg: SELECT ''D'',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'', errcode: 1064, 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 ''',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,''' at line 1
From this 10 lines the first 9 are made when the application starts.
Then I used a tdbnavigator which is connected with a tzquery (first select statement), here I put on the insert Button, but it seems that no SQL statement is made for this.
Afterwards I inserted one field (matchcode) and then went one row forward, then i get this error.