Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: Lower case in update
Lower case in update
Posted: 2007/06/29 16:31
 
Hi !

Thanks for previous help !

Now i try to move a old system/bde to Anydac.

But i´m in trouble again with a edit comand ( in a query)

My query:
SELECT * FROM CG_PARCE
WHERE NM_CONTRAT=:CONTR AND
NM_LIBERAC=:LIBER



qrPARCE.Edit;
qrPARCE.FieldbyName('VL_ADAPCPR').asFloat := 500;
qrPARCE.Post;


I receive error:

"cg_parce" ... invalid object name

(Note the lower case now)...

Thanks in advance...
Re:Lower case in update
Posted: 2007/06/30 07:39
 
Hello,

I had same problems with case sensitive table and field names. I fixed that by 'hacking' Dmitry's code (daADPhysMySQL.pas, line 432)

 FNameCaseSensitive :=      QueryValue('SHOW VARIABLES LIKE ''lower_case_table_names'''1) = '0';

and changed it to

 FNameCaseSensitive :=       QueryValue('SHOW VARIABLES LIKE ''lower_case_table_names'''1) <> '1';

In my MySQL environment there was NO variable lower_case_table_names set but tables and fields stored with upper- and lowercase letters.
You can look in debugger, how FNameCaseSensitive is set after that and if it's TRUE, your query should work.

See also:


I'm in communication with Dmitry about that issue and think it will be fixed in version 2.

Regards,
Knut

Post edited by: knulo, at: 2007/06/30 07:48