在ADOQUERY的SQL中加入
CREATE DATABASE bbb
ON
( NAME = bbb_dat,
FILENAME = 'c:/temp/bbb.mdf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5 )
LOG ON
( NAME = 'bbb_log',
FILENAME = 'c:/temp/bbblog.ldf',
SIZE = 5MB,
MAXSIZE = 25MB,
FILEGROWTH = 5MB )
再执行ADOQUERY.EXECSQL,就生成BBB数据库,具体可以看SQL-SERVER帮助
adoconnection1连到SQL2000上,adoquery的connection设为adoconnection1。