请教高手 delphi 里能否调用 sql文件(a.sql) 将它执行(数据库是oracle)?a.sql 内容:create table tab1 (
col1 number not null,
col2 date
);
create table tab2 (
col1 number not null,
col2 varchar(40)
); 可以的话应该怎么做?
(不行读a.sql文件 而是直接执行,如在sqlplus里执行似的)
col1 number not null,
col2 date
);
create table tab2 (
col1 number not null,
col2 varchar(40)
); 可以的话应该怎么做?
(不行读a.sql文件 而是直接执行,如在sqlplus里执行似的)
adoquery.sql.loadfromfile('c:\a.sql');
adoquery.execsql;
你可以把.sql文件当作一个普通的文本文件看待,
with adoquery do
begin
sql.clear;
sql.loadfromfile('c:\a.sql');
open;//(或者execsql);
end;
create table tab1 (
col1 number not null,
col2 char(10) null,
col3 date
);create table tab2 (
col1 number not null,
col2 char(10) null,
col3 date
);不是单条语句 应该怎么做?