Problem with inserting

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
MarkusG
Posts: 4
Joined: Mon 18 Aug 2008 14:55

Problem with inserting

Post by MarkusG » Tue 19 Aug 2008 10:19

Hello Forum,

is there any know issue about problems with inserting new datasets into a table using query.insert?

I have the following prob:

When using the query.insert method, the following statement is send to the db-server:

"SELECT N FROM Dual;"

This is not correct and results (obviuosly) in an error.

Unfortunately, i am not able to send a small example, because this only happens in our relative large app.
There is only one hint i can give:
We just switched from BDS 2006 to RAD 2007. There was no problem under BDS 2006. Ok, we also changed the ODAC Version to ODAC 6.50.0.36

I try to debug it in our app - and your source code - and reply to this topic when there is any more information...

But if you already know about this problem, please reply here.

Regards

Markus

MarkusG
Posts: 4
Joined: Mon 18 Aug 2008 14:55

Solved: Default Expression!

Post by MarkusG » Tue 19 Aug 2008 12:38

Hi Forum,

i solved it.
There was a default expression in one field.

This has to be in ' '
I just wonder why there was no error in BDS 2006.
Only in RAD 2007.

Greetings

Markus

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 20 Aug 2008 08:16

The error appears because you are using a newer version of ODAC. Starting with ODAC 6.50, string default expressions should be quoted: 'N'. If an expression is not quoted, ODAC suggests that it is a name of a stored function.

Post Reply