A
abhayjoukani
HI All,
i have a problem accessing a DBF file from c#. this is the code i have
specified
string strConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\mmyyyy.dbf;Extended Properties=DBASE IV;";
OleDbConnection objConnn = new OleDbConnection();
objConnn.ConnectionString = strConnection;
try
{
objConnn.Open();
}
catch(Exception eee)
{
MessageBox.Show(eee.ToString());
}
objConnn.Close();
it says
System.Data.OleDb.OleDbException: 'c:\mmyyyy.dbf' is not a valid path.
Make sure that the path name is spelled correctly and that you are
connected to the server on which the file resides.
at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
at System.Data.OleDb.OleDbConnection.InitializeProvider()
at System.Data.OleDb.OleDbConnection.Open()
at WindowsApplication2.Form1.button3_Click(Object sender, EventArgs
e) in d:\documents and settings\administrator\my documents\visual
studio projects\windowsapplication2\form1.cs:line 426
it is strange because i have been connection to the local computer not
a networkd one and + i have been accessing this since past few days
without a problem
i have installed Microsoft's oledb drivers for foxpro + MDAC
PN :- i have tries this connection string also
"Provider=VFPOLEDB.1;Data Source="C:\mmyyyy.dbf;"
thanks,
abhay.
i have a problem accessing a DBF file from c#. this is the code i have
specified
string strConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\mmyyyy.dbf;Extended Properties=DBASE IV;";
OleDbConnection objConnn = new OleDbConnection();
objConnn.ConnectionString = strConnection;
try
{
objConnn.Open();
}
catch(Exception eee)
{
MessageBox.Show(eee.ToString());
}
objConnn.Close();
it says
System.Data.OleDb.OleDbException: 'c:\mmyyyy.dbf' is not a valid path.
Make sure that the path name is spelled correctly and that you are
connected to the server on which the file resides.
at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
at System.Data.OleDb.OleDbConnection.InitializeProvider()
at System.Data.OleDb.OleDbConnection.Open()
at WindowsApplication2.Form1.button3_Click(Object sender, EventArgs
e) in d:\documents and settings\administrator\my documents\visual
studio projects\windowsapplication2\form1.cs:line 426
it is strange because i have been connection to the local computer not
a networkd one and + i have been accessing this since past few days
without a problem
i have installed Microsoft's oledb drivers for foxpro + MDAC
PN :- i have tries this connection string also
"Provider=VFPOLEDB.1;Data Source="C:\mmyyyy.dbf;"
thanks,
abhay.