Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: ADTable.InsertRecord problem
ADTable.InsertRecord problem
Posted: 2007/06/12 16:16
 
Hi

I've a trouble with changeing tadoquery to tadquery (linked to msaccess file).
Procedure InsertRecord([src_qry.fields[0],src_qry.fields[1], ...]) works fine with ado ... but not with anydac . The error message is :

".. EODBCNativeException with message:
'[Anydac][Phys][ODBC][Microsoft][MSAccess Driver] Syntax error with INSERT INTO.'.

Any idea ?
Re:ADTable.InsertRecord problem
Posted: 2007/06/21 09:00
 
Hello

1) What do you really use - InsertRecord([src_qry.fields[0],src_qry.fields[1], ...]) or InsertRecord([src_qry.fields[0].Value,src_qry.fields[1].Value, ...]) ?
2) Could you provide me the SQL command text, which gives error ? For that either turn tracing on, either drop AnyDAC error dialog component and when error will happen see Advanced -> Query tab of this dialog.

Regards,
Dmitry
Re:ADTable.InsertRecord problem
Posted: 2007/06/25 16:20
 
Helo

Diman wrote:

Hello
1) What do you really use - InsertRecord([src_qry.fields[0],src_qry.fields[1], ...]) or InsertRecord([src_qry.fields[0].Value,src_qry.fields[1].Value, ...]) ?


I try both way .. i've got an error with both.


2) Could you provide me the SQL command text, which gives error ?

INSERT INTO PLATNOSCI_KLIENTA (IDENTITY, NAME, PAY_DATE, DUE_DATE, PAID_AMOUNT, CURRENCY, LEDGER_ITEM_SERIES_ID, LEDGER_ITEM_ID, FULLY_PAID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)

.. by the way .. with TADOQuery it works.

Regards Morff