可以,也可以用asp文件创建表
例子如下:
<%
On Error Resume Next
set con=server.createobject("adodb.connection")
con.open "server=(local);driver=sql server;database=redriver;uid=sa;pwd="
'Catalog
'con.execute "drop table Catalog"
sql="create table Catalog( CatalogID int NOT NULL ,"&_
"CatalogName nvarchar(40) Not Null,"&_
"FatherID int not null)"
con.execute sql
'con.execute "drop table Product"
sql="create table Product( ProductID int identity(1,1) NOT NULL ,"&_
"ProductName nvarchar(100) Not Null,"&_
"ProductNumber nvarchar(40) Not Null,"&_
"StopFlag bit not null,"&_
"Bitmap nvarchar(50) Null,"&_
"Notes ntext null,"&_
"Discount real null,"&_
"Price real null,"&_
"FatherID int not null)"
con.execute sql
Response.Write Err.Description
%>