SQLCA.DBMS = "MSS Microsoft SQL Server 6.x"
SQLCA.Database = "master"
SQLCA.ServerName = "server"
SQLCA.LogId = "sa"
SQLCA.AutoCommit = False
SQLCA.DBParm = ""
Execute immediate "create database nbhhyy2003"
using sqlca;
if sqlca.sqlcode<0 then
messagebox('err!',sqlca.sqlerrtext)
end if
结果出现错误:Create Database statement not allowed within multi-statement transaction.