Page 1 of 1

Create Tables at Uniquery

Posted: Thu 11 Jul 2013 08:24
by hoi82
I have three syntaxes for create table.

For example,

CREATE TABLE TestTable1(
SHEET_IDX1 integer,
TIMEZONEIDX1 integer, SYNC_CARGO_PORT text );
CREATE TABLE TestTable2(
SHEET_IDX2 integer,
TIMEZONEIDX2 integer, SYNC_CARGO_PORT2 text );
CREATE TABLE TestTable3(
SHEET_IDX3 integer,
TIMEZONEIDX3 integer, SYNC_CARGO_PORT2 text );

When I input like below, only one table is created.

Uniquery.SQL.Add('CREATE TABLE TestTable1(
SHEET_IDX1 integer,
TIMEZONEIDX1 integer, SYNC_CARGO_PORT text ); ');
Uniquery.SQL.Add('CREATE TABLE TestTable2(
SHEET_IDX2 integer,
TIMEZONEIDX2 integer, SYNC_CARGO_PORT text ); ');
Uniquery.SQL.Add('CREATE TABLE TestTable3(
SHEET_IDX3 integer,
TIMEZONEIDX3 integer, SYNC_CARGO_PORT text ); ');

Uniquery.Execute;

How can I create these tables by calling execute method one time?

Re: Create Tables at Uniquery

Posted: Thu 11 Jul 2013 11:30
by DemetrionQ
Hello.

To execute several SQL statements, you should use the TUniScript component. The detailed information about TUniScript can be found here: http://www.devart.com/unidac/docs/devar ... script.htm