Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Nov 2004
    Location
    London, United Kingdom
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Writing to Visual FoxPro files (2000)

    I am trying to run an update query on a Visual fox pro file, the code I currently have is
    Set cnn = New Connection
    cnn.Open "Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;" _
    & "SourceDb=SatabaseCOLDTESTN_wname.dbf"
    Set rst = New ADODB.Recordset
    rst.CursorType = adOpenDynamic
    rst.CursorLocation = adUseClient
    rst.Open "select * from wname", cnn
    however i get the following error
    "File name wname.dbf does not exist"
    however the file definately exists

    many thanks

    rst.Open "select * from wname", cnn

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Writing to Visual FoxPro files (2000)

    I don't work with FoxPro myself, but I think you should only specify the folder when you open the connection. The filename will be the name of the table you open.

Posting Permissions

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