大家帮我看看,下面这段运行时报中间的插入语句错误!!!!!
不知道如何错了? sSQL = "select * from tb_xsmx"
Set Rs = Run_sql(sSQL, Qtconn) With Rs
Do While Not .EOF sSQL = "insert into " & SJ_BBB & "_Xsmx(f_Spbm,f_lsdbm,f_Djh,f_Dnxh,f_Xsrq,f_Xssk,f_Syybm,f_Yyybm,f_Khbm,f_Xssl,f_Ssje,f_Zkzr,f_sfzcxs, f_xslx) values " & _
"('" & !f_spbm & "','" & !f_lsdbm & "','" & !f_djh & "','" & !f_dnxh & "','" & !f_xsrq & "','" & !f_xssk & "','" & !f_syybm & "','" & !f_yyybm & "','" & !f_khbm & "', " & _
"" & !f_xssl & "," & !f_ssje & "," & !f_zkzr & ",'" & !f_sfzcxs & "','" & !f_xslx & "') "
Cmd.CommandText = sSQL
Cmd.Execute , , adExecuteNoRecords
.NextRecordset Loop End With
不知道如何错了? sSQL = "select * from tb_xsmx"
Set Rs = Run_sql(sSQL, Qtconn) With Rs
Do While Not .EOF sSQL = "insert into " & SJ_BBB & "_Xsmx(f_Spbm,f_lsdbm,f_Djh,f_Dnxh,f_Xsrq,f_Xssk,f_Syybm,f_Yyybm,f_Khbm,f_Xssl,f_Ssje,f_Zkzr,f_sfzcxs, f_xslx) values " & _
"('" & !f_spbm & "','" & !f_lsdbm & "','" & !f_djh & "','" & !f_dnxh & "','" & !f_xsrq & "','" & !f_xssk & "','" & !f_syybm & "','" & !f_yyybm & "','" & !f_khbm & "', " & _
"" & !f_xssl & "," & !f_ssje & "," & !f_zkzr & ",'" & !f_sfzcxs & "','" & !f_xslx & "') "
Cmd.CommandText = sSQL
Cmd.Execute , , adExecuteNoRecords
.NextRecordset Loop End With
Set Rs = Run_sql(sSQL, Qtconn) Do While Not .EOF sSQL = "insert into " & SJ_BBB & "_Xsmx(f_Spbm,f_lsdbm,f_Djh,f_Dnxh,f_Xsrq,f_Xssk,f_Syybm,f_Yyybm,f_Khbm,f_Xssl,f_Ssje,f_Zkzr,f_sfzcxs, f_xslx) values " & _
"('" & rs(0) & "','" & rs(1) & "','" & rs(2) & "','" & rs(3) & "','" & rs(4) & "','" & rs(5) & "','" & !f_syybm & "','" & !f_yyybm & "','" & !f_khbm & "', " & _
"'," & rs(6) & "," & rs(7) & "," & rs(8) & ",'" & rs(9) & "','" & rs(10) & "') "
Cmd.CommandText = sSQL
Cmd.Execute , , adExecuteNoRecords
.NextRecordset
rs(0)
Loop
Do While Not .EOF sSQL = "insert into " & SJ_BBB & "_Xsmx(f_Spbm,f_lsdbm,f_Djh,f_Dnxh,f_Xsrq,f_Xssk,f_Syybm,f_Yyybm,f_Khbm,f_Xssl,f_Ssje,f_Zkzr,f_sfzcxs, f_xslx) values " & _
"('" & rs(0) & "','" & rs(1) & "','" & rs(2) & "','" & rs(3) & "','" & rs(4) & "','" & rs(5) & "','" & rs(6) & "','" & rs(7) & "','" & rs(8) & "', " & _
rs(9) & "," & rs(10) & "," & rs(11) & ",'" & rs(12) & "','" & rs(13) & "')"
Cmd.CommandText = sSQL
Cmd.Execute , , adExecuteNoRecords
.NextRecordset Loop