access中的execute方法怎么用,数据都不能更新过来?

来源:百度知道 编辑:UC知道 时间:2024/09/21 01:33:08

conn 是ADO的数据库连接对象,TableName 是表名,filed1、filed2 是字段名,value1 是数值型变量,value2 是字符串变量,则
1、修改记录
conn.execute "update TableName set filed1=" & value1 & " filed2='" & value2 & "'"
2、添加记录
conn.execute "insert into TableName(filed1, filed2) values(" & value1 & ",'" & value2 & "')"

你问的问题不对啊兄弟.

你是用什么语言写的啊?Access只是个数据库,然后用execute操作去执行它。