H
hbgrape
Unregistered / Unconfirmed
GUEST, unregistred user!
//新建数据库设备
with adoquery1 do
begin
close;
sql.Clear;
sql.Add('CREATE DATABASE :name'+
' ON ( NAME = :datdev,FILENAME = :devdat,'+
'SIZE = 10) '+
' LOG ON ( NAME = :datlog,FILENAME = :devlog,'+
'SIZE = 5)');
parameters.ParamByName('name').Value := data;
parameters.ParamByName('datdev').Value := data+'_dat';
parameters.ParamByName('devdat').Value := devdat+'/'+data+'_dat.mdf';
parameters.ParamByName('datlog').Value := data+'_log';
parameters.ParamByName('devlog').Value := devlog+'/'+data+'_log.ldf';
try
execsql;
except
showmessage('创建数据库失败,请与管理员联系!');
// result := false; +
exit;
end;
怎么修改?
with adoquery1 do
begin
close;
sql.Clear;
sql.Add('CREATE DATABASE :name'+
' ON ( NAME = :datdev,FILENAME = :devdat,'+
'SIZE = 10) '+
' LOG ON ( NAME = :datlog,FILENAME = :devlog,'+
'SIZE = 5)');
parameters.ParamByName('name').Value := data;
parameters.ParamByName('datdev').Value := data+'_dat';
parameters.ParamByName('devdat').Value := devdat+'/'+data+'_dat.mdf';
parameters.ParamByName('datlog').Value := data+'_log';
parameters.ParamByName('devlog').Value := devlog+'/'+data+'_log.ldf';
try
execsql;
except
showmessage('创建数据库失败,请与管理员联系!');
// result := false; +
exit;
end;
怎么修改?