在ASP创建ACCESS数据表.
表名:othername:文本content:备注不是SQL数据库.是ACCESS.而且就两个项.写这么多....
表名:other
name:文本
content:备注
不是SQL数据库.是ACCESS.
而且就两个项.
写这么多. 展开
name:文本
content:备注
不是SQL数据库.是ACCESS.
而且就两个项.
写这么多. 展开
1个回答
展开全部
Function CreateTableName(TableName)
TableSql="CREATE TABLE "&TableName&" ("
TableSql=TableSql+"UserID autoincrement PRIMARY KEY,"
TableSql=TableSql+"UserName VARCHAR(20),"
TableSql=TableSql+"Password VARCHAR(16),"
TableSql=TableSql+"GradeLevel Long,"
TableSql=TableSql+"GradeName VARCHAR(20),"
TableSql=TableSql+"PostID Long,"
TableSql=TableSql+"PostName VARCHAR(20),"
TableSql=TableSql+"UserRealName VARCHAR(10),"
TableSql=TableSql+"UserSex VARCHAR(10),"
TableSql=TableSql+"UserTel VARCHAR(20),"
TableSql=TableSql+"UserMobile VARCHAR(20),"
TableSql=TableSql+"WorkQQ VARCHAR(20),"
TableSql=TableSql+"WorkEmail VARCHAR(60),"
TableSql=TableSql+"WorkMSN VARCHAR(60),"
TableSql=TableSql+"WorkDuty VARCHAR(20)," TableSql=TableSql+"CheckStatus BIT NOT NULL,"
TableSql=TableSql+"CheckUser VARCHAR(20),"
TableSql=TableSql+"CheckTime DateTime,"
TableSql=TableSql+"CheckIP VARCHAR(16),"
TableSql=TableSql+"CheckFrom VARCHAR(100),"
TableSql=TableSql+"AddUser VARCHAR(20),"
TableSql=TableSql+"AddTime DateTime,"
TableSql=TableSql+"AddIP VARCHAR(16),"
TableSql=TableSql+"AddFrom VARCHAR(100),"
TableSql=TableSql+"UpdateUser VARCHAR(20),"
TableSql=TableSql+"UpdateTime DateTime,"
TableSql=TableSql+"UpdateIP VARCHAR(16),"
TableSql=TableSql+"UpdateFrom VARCHAR(100)," TableSql=TableSql+"TotalLoginTimes Long,"
TableSql=TableSql+"LoginTime DateTime,"
TableSql=TableSql+"LoginIP VARCHAR(16),"
TableSql=TableSql+"LoginFrom VARCHAR(100),"
TableSql=TableSql+"LastLoginTime DateTime,"
TableSql=TableSql+"LastLoginIP VARCHAR(16),"
TableSql=TableSql+"LastLoginFrom VARCHAR(100)"
TableSql=TableSql+")"
response.Write("<br>正在执行数据库操作语句"&TableSql)
conn.execute(TableSql)
if err then
response.Write("<br>发生系统错误")
response.Write(err.description)
else
response.Write("<br>语句执行成功")
end if
end Function
'调用
CreateTableName(other)
TableSql="CREATE TABLE "&TableName&" ("
TableSql=TableSql+"UserID autoincrement PRIMARY KEY,"
TableSql=TableSql+"UserName VARCHAR(20),"
TableSql=TableSql+"Password VARCHAR(16),"
TableSql=TableSql+"GradeLevel Long,"
TableSql=TableSql+"GradeName VARCHAR(20),"
TableSql=TableSql+"PostID Long,"
TableSql=TableSql+"PostName VARCHAR(20),"
TableSql=TableSql+"UserRealName VARCHAR(10),"
TableSql=TableSql+"UserSex VARCHAR(10),"
TableSql=TableSql+"UserTel VARCHAR(20),"
TableSql=TableSql+"UserMobile VARCHAR(20),"
TableSql=TableSql+"WorkQQ VARCHAR(20),"
TableSql=TableSql+"WorkEmail VARCHAR(60),"
TableSql=TableSql+"WorkMSN VARCHAR(60),"
TableSql=TableSql+"WorkDuty VARCHAR(20)," TableSql=TableSql+"CheckStatus BIT NOT NULL,"
TableSql=TableSql+"CheckUser VARCHAR(20),"
TableSql=TableSql+"CheckTime DateTime,"
TableSql=TableSql+"CheckIP VARCHAR(16),"
TableSql=TableSql+"CheckFrom VARCHAR(100),"
TableSql=TableSql+"AddUser VARCHAR(20),"
TableSql=TableSql+"AddTime DateTime,"
TableSql=TableSql+"AddIP VARCHAR(16),"
TableSql=TableSql+"AddFrom VARCHAR(100),"
TableSql=TableSql+"UpdateUser VARCHAR(20),"
TableSql=TableSql+"UpdateTime DateTime,"
TableSql=TableSql+"UpdateIP VARCHAR(16),"
TableSql=TableSql+"UpdateFrom VARCHAR(100)," TableSql=TableSql+"TotalLoginTimes Long,"
TableSql=TableSql+"LoginTime DateTime,"
TableSql=TableSql+"LoginIP VARCHAR(16),"
TableSql=TableSql+"LoginFrom VARCHAR(100),"
TableSql=TableSql+"LastLoginTime DateTime,"
TableSql=TableSql+"LastLoginIP VARCHAR(16),"
TableSql=TableSql+"LastLoginFrom VARCHAR(100)"
TableSql=TableSql+")"
response.Write("<br>正在执行数据库操作语句"&TableSql)
conn.execute(TableSql)
if err then
response.Write("<br>发生系统错误")
response.Write(err.description)
else
response.Write("<br>语句执行成功")
end if
end Function
'调用
CreateTableName(other)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询