D
David Hauser
Hi
I moved an ASP.NET website to a new server an suddenly got the following
error when connection to my MS Access database:
"System.Runtime.InteropServices.SEHException: External component has thrown
an exception".
Searching the web and newsgroups for a solution I found several pages with
this topic, but it seems like it's a very general Exception... hints for my
specific problem i did not find.
Here's the code which throws the exception (at line 3, cn.Open()):
using (OleDbConnection cn = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data
source=C:\Data\MyDataBase.mdb"))
{
cn.Open();
OleDbCommand cmd = new OleDbCommand("SELECT * FROM Content ORDER BY
Title");
cmd.Connection = cn;
OleDbDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
// do something
}
cn.Close();
}
Thanks a lot for your help.
Greets, Dave
I moved an ASP.NET website to a new server an suddenly got the following
error when connection to my MS Access database:
"System.Runtime.InteropServices.SEHException: External component has thrown
an exception".
Searching the web and newsgroups for a solution I found several pages with
this topic, but it seems like it's a very general Exception... hints for my
specific problem i did not find.
Here's the code which throws the exception (at line 3, cn.Open()):
using (OleDbConnection cn = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data
source=C:\Data\MyDataBase.mdb"))
{
cn.Open();
OleDbCommand cmd = new OleDbCommand("SELECT * FROM Content ORDER BY
Title");
cmd.Connection = cn;
OleDbDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
// do something
}
cn.Close();
}
Thanks a lot for your help.
Greets, Dave