FoxPro OLEDB Error "Invalid Path or Filename"

Discussion in '.NET' started by ninel, Mar 5, 2008.

  1. ninel

    ninel

    Joined:
    Aug 7, 2007
    Messages:
    2
    I have a foxpro free dbf table sitting on my C drive. I am trying to insert records using the OLEDB provider to connect to Foxpro. This works if the dbf is on my C drive. When I change the connectionstring to a different server I get the invalid path or filename error.

    Here is my code:
    Code:
            Dim objFoxProConn As OleDbConnection
            Dim FoxProConnString As String
            Dim sVfp As String
    
            FoxProConnString = "Provider=vfpoledb.1;Data Source=\\ITITPAFS02.ititpa.itic\pds\voicenet\system\;Collating Sequence=general;Exclusive=No;"
            
            objFoxProConn = New OleDb.OleDbConnection(FoxProConnString)
            objFoxProConn.Open()
    
            sVfp = "INSERT INTO agentusr(agentid, login, last, first, socsec, phone, address, city, state, zip,notes,otherid,disabled,verifier) "
            sVfp = sVfp & " VALUES(66100,'TEST','TEST','NEL','034554354','813-834-3045','123 Main street','Tampa','FL','34638','', '',.F.,.F.)"
           
            Dim oCmdTAMPA As New OleDbCommand(sVfp, objFoxProConn)
            oCmdTAMPA.ExecuteNonQuery()
     
    What am I doing wrong??
    Please help.

    Thanks,
    Ninel
    ninel, Mar 5, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. alex9128
    Replies:
    1
    Views:
    604
    alexander.murillo@cantv.net
    Sep 8, 2005
  2. JN
    Replies:
    0
    Views:
    3,169
  3. Jan Smazinka

    Visual FoxPro OleDB Driver in ASP.NET

    Jan Smazinka, Nov 28, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,995
    Jan Smazinka
    Nov 28, 2003
  4. Jan Smazinka

    FoxPro OleDb Problem on Windows 2003

    Jan Smazinka, Nov 28, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    481
    Jan Smazinka
    Nov 28, 2003
  5. ninel

    .NET & Foxpro OLEDB

    ninel, Mar 6, 2008, in forum: .NET
    Replies:
    0
    Views:
    820
    ninel
    Mar 6, 2008
Loading...

Share This Page