Sql = ""
Sql = "insert into " & Text1(0).Text & "(title,cona,conb,conc,cond,cone,keys) values "
Sql = Sql & "('" & Text1(1).Text & "',"
Sql = Sql & Text1(2).Text & "," & Text1(3).Text & "," & Text1(4).Text & ","
Sql = Sql & Text1(5).Text & "," & Text1(6).Text & "," & Text1(7).Text & ")"
Sql = "insert into " & Text1(0).Text & "(title,cona,conb,conc,cond,cone,keys) values "
Sql = Sql & "('" & Text1(1).Text & "',"
Sql = Sql & Text1(2).Text & "," & Text1(3).Text & "," & Text1(4).Text & ","
Sql = Sql & Text1(5).Text & "," & Text1(6).Text & "," & Text1(7).Text & ")"
Sql = "insert " & Text1(0).Text & "(title,cona,conb,conc,cond,cone,keys) values "
Sql = Sql & "('" & Text1(1).Text & "','"
Sql = Sql & Text1(2).Text & "','" & Text1(3).Text & "','" & Text1(4).Text & "','"
Sql = Sql & Text1(5).Text & "','" & Text1(6).Text & "','" & Text1(7).Text & "')"
直接写call cmd.execute就可以了.
如果想把新插入的记录返回来,最好用rs.addnew,然后赋值更新.
Sql = "insert into " & Text1(0).Text & "(title,cona,conb,conc,cond,cone,keys) values "
Sql = Sql & "('" & Text1(1).Text & "','"
Sql = Sql & Text1(2).Text & "','" & Text1(3).Text & "','" & Text1(4).Text & "','"
Sql = Sql & Text1(5).Text & "','" & Text1(6).Text & "','" & Text1(7).Text & "')"
怎么回师?
说 text(7).text还是类型不符合/
难道真象fling_boy(男孩)说的?
那解决办法是什么?
以前可能不是varchar 我把他改成varchar后 就可以了
散分喽!!!!!!!!!
大家回家收衣服喽~~~~~