我写了这么段代码:
dim string2,string3 as string
string2="provider=microsoft.jet.oledb.4.0;data source=" & server.mappath("test.mdb")
dim myconnection as new oledbconnection(string2)
string3="insert into user_info values(@name,@sex)"
dim mycommand1 as new oledbcommand(string3,myconnection)
mycommand1.parameters.add(new oledbparameter("@name",oledbtype.varchar,255))
mycommand1.parameters("@name").value=request.form("name")
mycommand1.parameters.add(new oledbparameter("@sex",oledbtype.varchar,255))
mycommand1.parameters("@sex").value=request.form("gender")
mycommand1.connection.open()
mycommand1.executenonquery()
mycommand1.connection.close()
但系统报错:操作必须使用一个可更新的查询
然后我的数据库文件:test.mdb就变成了只读 请问各位高手
这是为什么?
dim string2,string3 as string
string2="provider=microsoft.jet.oledb.4.0;data source=" & server.mappath("test.mdb")
dim myconnection as new oledbconnection(string2)
string3="insert into user_info values(@name,@sex)"
dim mycommand1 as new oledbcommand(string3,myconnection)
mycommand1.parameters.add(new oledbparameter("@name",oledbtype.varchar,255))
mycommand1.parameters("@name").value=request.form("name")
mycommand1.parameters.add(new oledbparameter("@sex",oledbtype.varchar,255))
mycommand1.parameters("@sex").value=request.form("gender")
mycommand1.connection.open()
mycommand1.executenonquery()
mycommand1.connection.close()
但系统报错:操作必须使用一个可更新的查询
然后我的数据库文件:test.mdb就变成了只读 请问各位高手
这是为什么?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货