Page 1 of 1

Help with INSERT INTO

Posted: Thu 15 Mar 2007 17:21
by camus
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?

Posted: Fri 16 Mar 2007 10:54
by Plash
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.

Posted: Fri 16 Mar 2007 18:14
by camus
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.