Multiple commands to Oracle

From: Stefan Olofsson (stefan.olofsson_at_nospam.com)
Date: 09/30/04


Date: Thu, 30 Sep 2004 16:43:01 +0300

Hi all

var
    Q : TADOQuery;
begin
    Q := TADOQuery.Create(nil);
    Q.Connection := ADOConnection1;
    Q.SQL.Text := 'insert into table1 (Id, Col1) values (1, ''data'')'#13#10
+
                            'insert into table1 (Id, Col1) values (2,
''other data'')';
    Q.ExecSql;
    Q.Free;
end;

This test works on MS Sql Server but not on Oracle 9i. As you see I try to
send multiple commands in one "batch".
Anyone have a soulution? I have tried both
'insert into table1 (Id, Col1) values (1, ''data'')'#13#10 +
'insert into table1 (Id, Col1) values (2, ''other data'')';
and
'insert into table1 (Id, Col1) values (1, ''data'');'#13#10 +
'insert into table1 (Id, Col1) values (2, ''other data'')';

Thanks
/Stefan



Relevant Pages

  • Re: UPDATE and SELECT in one statement
    ... I'm a bit brainwashed by the SQL Server Programming dialect... ... Oracle 9i Personnal Edition. ... var bnd1 NUMBER ... var bnd2 VARCHAR2 ...
    (comp.databases.oracle.server)
  • Re: IOT, memory and transaction time
    ... easily generate it with DBMS_METADATA.GET_DDL if your verison of Oracle ... were pretty consistent no matter how big the table (this transaction ... FOREIGN KEY (versionNo) REFERENCES T_TRANSACTIONS, ... Oracle provides read consistency and SQL Server ...
    (comp.databases.oracle.misc)
  • Re: Database or store to handle 30 Mb/sec and 40,000 inserts/sec
    ... "Writers block readers and readers block writers in SQLServer. ... getting around this fundamental issue and because of it SQL Server ... admitted they can happen in Oracle, I guess Oracle should never been used ... isolation level but you will always disagree because you follow doctorine ...
    (comp.databases.oracle.server)
  • Re: IOT, memory and transaction time
    ... easily generate it with DBMS_METADATA.GET_DDL if your verison of Oracle ... If it was the update statement that references ... FOREIGN KEY (versionNo) REFERENCES T_TRANSACTIONS, ... There are however differences how both products deal with concurrency; in Oracle readers don't get blocked while this may happen in SQL Server. ...
    (comp.databases.oracle.misc)
  • Re: Import problems on Windows Server
    ... XP is fine, so is Vista, like you I use them day in day out, around 12 hours ... a day myself too - laptops and the desktop i'm writing this on. ... I use SQL Server on XP and Vista for writing and demo'ing stuff, ... those are the same problems in the Oracle world. ...
    (comp.databases.oracle.server)