S
S_K
Hi,
I'm working on a project that requires a small database. I'm thinking
an .MDF database.
However, I'm having a problem with connecting to the database. The
code I have is:
string strConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Inetpub\wwwroot\Use Tax\App_Data\AddressBook.mdf";
OleDbConnection objConnection = new
OleDbConnection(strConnection);
objConnection.Open();
OleDbDataAdapter adapter = new OleDbDataAdapter("select FName,
LName from Address", objConnection);
DataSet ds = new DataSet();
adapter.Fill(ds, "Address");
I get an 'Unrecognized database format 'C:\Inetpub\wwwroot\Use Tax
\App_Data\AddressBook.mdf' OleDbExcption when I run it.
Any ideas?
Thanks in advance.
I'm working on a project that requires a small database. I'm thinking
an .MDF database.
However, I'm having a problem with connecting to the database. The
code I have is:
string strConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Inetpub\wwwroot\Use Tax\App_Data\AddressBook.mdf";
OleDbConnection objConnection = new
OleDbConnection(strConnection);
objConnection.Open();
OleDbDataAdapter adapter = new OleDbDataAdapter("select FName,
LName from Address", objConnection);
DataSet ds = new DataSet();
adapter.Fill(ds, "Address");
I get an 'Unrecognized database format 'C:\Inetpub\wwwroot\Use Tax
\App_Data\AddressBook.mdf' OleDbExcption when I run it.
Any ideas?
Thanks in advance.