Data provider or other service returned a E_FAIL status.
Windows XP/Visual Foxpro 6.0/Visual Basic 6.0 SP5
Hi all,
I am getting this error:
Run-time Error '2147467259 (80004005)
Data provider or other service returned a E_FAIL status.
I am getting the error when doing an insert from a VFP6 database into another VBF6 database table.
I have observed that it seems to stem from the .movenext statement.
Anyone have any past experience with this and solving it?
I have downloaded the latest vfpoledb from Microsoft
Thanks in advance.
VB Code:
Dim sSQL As String
Do While Not rs(2).EOF
'sSQL = "SELECT * FROM orders WHERE order = " & Text1.Text
sSQL = "INSERT INTO workorder_tmp (forder_id,fline_no,fcust_no,fcust_name,fdrawing_no,forder_date,fqty_req,fmat_no,fmat_descr,fmat_thick,fmachine,fuser_defined1,fuser_defined2,fuser_defined3,fuser_defined4) VALUES ('" & rs(2).Fields("Order").Value & _
"'," & rs(2).Fields("LINE_NO").Value & _
",'" & rs(2).Fields("CUSTOMER_NO").Value & _
"','" & rs(2).Fields("CUSTOMER_NAME").Value & _
"','" & rs(2).Fields("DRAWING").Value & _
"'," & rs(2).Fields("REQ_DATE").Value & _
"," & rs(2).Fields("QUANTITY").Value & _
",'" & rs(2).Fields("ITEM_CODE").Value & _
"','" & rs(2).Fields("ITEM_DESCRIPTION").Value & _
"'," & rs(2).Fields("THICKNESS").Value & _
",'" & rs(2).Fields("MACHINE").Value & _
"','" & rs(2).Fields("CUSTOMER_DIST").Value & _
"','" & rs(2).Fields("DISTRICT").Value & _
"','" & rs(2).Fields("Width").Value & _
"','" & rs(2).Fields("LENGTH").Value & "')"
'
db(1).Execute sSQL
rs(2).MoveNext
'Debug.Print sSQL
Loop
Re: Data provider or other service returned a E_FAIL status.
Are you checking all your fields for nulls before attempting the insert? Does this happen on every insert? how is rs(2) defined? what does the SQL look like etc, etc...