ASP创建数据库?
DBPath=Server.MapPath("/basedata#.asp")setconn=Server.CreateObject("ADODB.Connection"...
DBPath=Server.MapPath("/basedata#.asp")
set conn=Server.CreateObject("ADODB.Connection")
connstr="provider=microsoft.jet.oledb.4.0;data source=" & DBPath
conn.open connstr
action=Trim(Request.QueryString("action"))
If action="now" Then
response.write Now
ElseIf action="chk" Then
Num=Trim(Request.QueryString("num"))
Num=Replace(Num,"'","")
Num=Replace(Num,"and","")
Num=Replace(Num,"or","")
Num=Replace(Num," ","")
If Num<>"" Then
sql="select * from Data where Num='" & Num & "'"
set rs=conn.execute(sql)
If Not rs.eof Then
response.write rs("EndDate")
Else
response.write "错误:没有此用户!" 展开
set conn=Server.CreateObject("ADODB.Connection")
connstr="provider=microsoft.jet.oledb.4.0;data source=" & DBPath
conn.open connstr
action=Trim(Request.QueryString("action"))
If action="now" Then
response.write Now
ElseIf action="chk" Then
Num=Trim(Request.QueryString("num"))
Num=Replace(Num,"'","")
Num=Replace(Num,"and","")
Num=Replace(Num,"or","")
Num=Replace(Num," ","")
If Num<>"" Then
sql="select * from Data where Num='" & Num & "'"
set rs=conn.execute(sql)
If Not rs.eof Then
response.write rs("EndDate")
Else
response.write "错误:没有此用户!" 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询