Results 1 to 2 of 2

Thread: Data provider or other service returned a E_FAIL status.

  1. #1

    Thread Starter
    Hyperactive Member Always_Confused's Avatar
    Join Date
    Jun 2006
    Location
    Alabama USA
    Posts
    417

    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:
    1. Dim sSQL As String
    2.     Do While Not rs(2).EOF
    3.    
    4.    
    5.     'sSQL = "SELECT * FROM orders WHERE order = " & Text1.Text
    6.     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 & _
    7.     "'," & rs(2).Fields("LINE_NO").Value & _
    8.     ",'" & rs(2).Fields("CUSTOMER_NO").Value & _
    9.     "','" & rs(2).Fields("CUSTOMER_NAME").Value & _
    10.     "','" & rs(2).Fields("DRAWING").Value & _
    11.     "'," & rs(2).Fields("REQ_DATE").Value & _
    12.     "," & rs(2).Fields("QUANTITY").Value & _
    13.     ",'" & rs(2).Fields("ITEM_CODE").Value & _
    14.     "','" & rs(2).Fields("ITEM_DESCRIPTION").Value & _
    15.     "'," & rs(2).Fields("THICKNESS").Value & _
    16.     ",'" & rs(2).Fields("MACHINE").Value & _
    17.     "','" & rs(2).Fields("CUSTOMER_DIST").Value & _
    18.     "','" & rs(2).Fields("DISTRICT").Value & _
    19.     "','" & rs(2).Fields("Width").Value & _
    20.     "','" & rs(2).Fields("LENGTH").Value & "')"
    21.     '
    22.    
    23.    db(1).Execute sSQL
    24.    
    25.    rs(2).MoveNext
    26.    'Debug.Print sSQL
    27.    Loop

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width