Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
db="DB_txm.mdb" '数据库文件位置
conn.Open "DBQ="+server.mappath(""&db&"")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
Set opendb = conn
Sql = "Insert into tab_str (char1,char2,char3,char4) values ('"&Str1&"','"&Str2&"','"&Str3&"','"&Str4&"')"
response.write Sql
conn.execute Sql
conn.close
set conn=nothing
end if
%>
我对于vba环境不懂。不知可否请哪位兄弟,辛苦写详细点:
Private Sub Command2_Click()