FoxPro OLEDB Error "Invalid Path or Filename"

Joined
Aug 7, 2007
Messages
2
Reaction score
0
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top