Getting unrecognized errors? ?
I am a programmer and right now I am working on a project. It needs a small database, I think .mdf database. I got problem when I try to establish connection to database. This is the following code which I have written 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");
When I try to run it I got the error message- ‘Unrecognized database format\' –AddressBook.mdf. What happens to .mdf file? Is it corrupted? If yes then how I can repair unrecognized .mdf. pl. explain it to me.


