i develop web application asp.net connect to visual fox pro database free table(.dbf) with microsoft oledb for visualfoxpro driver. when i run program with vs2013 while developing connection is working fine. but when my website run on webserver it can't to search or connect to vfp database and i get this error : invalid path or file name
this is my code to connect vfp database.
Try
'if use visual fox pro Connect to a single DBF-file
ConnectionString = "Provider=vfpoledb;Data Source=//database/event/event/OPD/OUT.DBF;sourcetype=DBF;exclusive=No;Collating Sequence=machine; User ID=stat1;Password = stat1;"
dBaseConnection = New OleDb.OleDbConnection(ConnectionString)
dBaseConnection.Open()
sCommand = "SELECT lastdate,save_id,count(*) AS Tcoder FROM OUT.DBF WHERE lastdate BETWEEN CTOD('" & TextBox1.Text & "') and CTOD('" & TextBox2.Text & "') AND typeevent LIKE '%" & TextBox3.Text & "%' "
sCommand &= "AND lasttime >= '" & ddlFromTime.SelectedValue & "' AND lasttime <= '" & ddlToTime.SelectedValue & "' GROUP BY lastdate,save_id ORDER BY Tcoder DESC "
dBaseCommand = New OleDb.OleDbCommand(sCommand, dBaseConnection)
'
Dim dt As DataTable = GetData(dBaseCommand)
GridView1.DataSource = dt
GridView1.DataBind()
'
dBaseConnection.Close()
Catch ex As OleDb.OleDbException
Response.Write("Error: " + ex.Message)
End Try
how to fix this issue? thank in advance. -/-