ASP更新ACCESS数据

首先连接数据库,方法:http://www.xefan.com/archives/65914.html

法一:

1
2
3
4
5
ID = "4"
nm= "www.xefan.cn"
pw = "xefan.cn"
sql="update test set password='"&pw&"',username='"&nm&"' where ID="&ID&" "
conn.Execute(sql)

法二:

1
2
3
4
5
6
7
8
ID = "4"
nm= "www.xefan.cn"
pw = "xefan.cn"
sql = "select * from 44 where ID="&ID&""
rs.Open sql,conn,1,3
rs("password")=pw
rs("username")=nm
rs.update