下面代码可以实现: dim cnn as new adodb.connection dim rs as new adodb.recordset dim szSql as String cnn.Open "Provider=MSDASQL.1;Password=密码Persist Security Info=True;User ID=sa;Data Source=数据源名" '连接数据库的连接串szSql = "insert into Tweather (A,B) VALUES ('A','B')"rs.Open szSql, cn, adOpenStatic, adLockOptimistic rs.close
更新?是这样吗?Adodc1.Refresh
szSql = "insert into Tweather (A,B) VALUES ('A','B')" cn.execute szsql
dim cnn as new adodb.connection
dim rs as new adodb.recordset
dim szSql as String
cnn.Open "Provider=MSDASQL.1;Password=密码Persist Security Info=True;User ID=sa;Data Source=数据源名" '连接数据库的连接串szSql = "insert into Tweather (A,B) VALUES ('A','B')"rs.Open szSql, cn, adOpenStatic, adLockOptimistic
rs.close
cn.execute szsql
http://www.pointsmoney.com/userprofile.php?auid=747173959&ID=378120