|
找出有错误了
我在导出 有十几个字段,记录有1万-40万条 时会出错 处理几条记录不会出错
运行是错误'3075'
语法错误(操作符丢失)在'2005-7-19 9:03:31'
进入调试后
Do Until daoRs.EOF
strSQL = "INSERT INTO USysDAORecordsetOutport("
strFields = " Values("
For Each frmField In daoRs.Fields
If Not IsNull(frmField.Value) And Not IsEmpty(frmField.Value) Then
strSQL = strSQL & frmField.Name & ","
If frmField.Type = dbText Then
strFields = strFields & "'" & frmField.Value & "',"
Else
strFields = strFields & frmField.Value & ","
End If
End If
Next frmField
strSQL = Left(strSQL, Len(strSQL) - 1) & ")"
strFields = Left(strFields, Len(strFields) - 1) & ")"
daoDbs.Execute strSQL & strFields 这一行是黄色
daoRs.MoveNext
Loop
On Error Resume Next
DoCmd.OutputTo acOutputTable, "USysDAORecordsetOutport"
On Error GoTo 0
daoDbs.Execute "DROP TABLE USysDAORecordsetOutport"
End Sub
|
|