Help with INSERT INTO

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
camus
Posts: 2
Joined: Thu 15 Mar 2007 16:47

Help with INSERT INTO

Post by camus » Thu 15 Mar 2007 17:21

Hi,

I have problem using TOraQuery when executing query, my code is:

OraSession := TOraSession.Create (nil);
OraSession.Options.Net := True;
OraSession.ConnectString := 'user/pass@ip:port:server';
OraSession.Username := 'user';
OraSession.Password := 'pass';
OraSession.Server := 'ip:port:server';
OraSession.Connected := True;

OraQuery := TOraQuery.Create (nil);
OraQuery.AutoCommit := True;
OraQuery.SQL.Text :=
'INSERT INTO TABLE (FECHA, ID_TEST, NOMBRE, NUM_TEST, RESULT, X, Y)' +
' VALUES (''24/12/07'', 10, ''TUBO1'', 98, ''R'', ''-80'',''4596'')';
OraQuery.Execute;

When I execute query I have obteined the next error:

project raised exception raised class EInternal Error with message ". Process Stoped.

What's the correct form for use INSERT in TOraQuery?

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

Post by Plash » Fri 16 Mar 2007 10:54

The EInternalError exception class is used by ODAC internally. When debugger stops application execution with this exception, you should press F9 to continue execution and see the next exception that will be generated.

camus
Posts: 2
Joined: Thu 15 Mar 2007 16:47

Post by camus » Fri 16 Mar 2007 18:14

Tnxs Plash,

I find next exception "ORA-01843: not a valid month" . I change the month number (02) for string (February) and fix error.

Best Regards.

Post Reply