SQLCA.AUTOCOMMIT = TRUE
s_sql="CREATE database dbname log to XXX.log"
execute immediate :s_sql using sqlca;
if sqlca.sqlcode= -1 then
ROLLBACK USING SQLCA;
messagebox("错误","新建立失败!"+ SQLCA.SQLERRTEXT)
SQLCA.AUTOCOMMIT = FALSE
return -1
else
commit USING SQLCA;
messagebox("返回信息","新建成功!!")
end if