Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2014
    Posts
    1

    Unanswered: sql openquery to foxpro

    Dear Master,
    I need help to insert data to database foxpro using openquery
    i already create connection like below
    @server = 'EXIMBIL_LINK',
    @provider = 'MSDASQL',
    @srvproduct = '',
    @provstr = 'Driver={Microsoft Visual FoxPro Driver}; UID=;SourceDB=D:\training_test\data;SourceType=DBF ;Exclusive=No;BackgroundFetch=Yes'

    when i try to show table van with command :
    select * from openquery(EXIMBIL_LINK,'select * from van')

    it show query running well but when i try to insert new row to table van with command :
    INSERT into OpenQuery(EXIMBIL_LINK, 'SELECT c_user_id,c_user_name,full_name from van')
    VALUES('1000007668','IDMTEST2','IDMTEST2')

    throws error like this :
    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done

    any suggest what i must doing?

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    This may or may not work, but if it fails the error messages will help us to further diagnose the problem or problems:
    Code:
    INSERT INTO EXIMBIL_LINK...van
    (  c_user_id,c_user_name,full_name
    )  VALUES('1000007668','IDMTEST2','IDMTEST2')
    Please post the results.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Tags for this Thread

Posting Permissions

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