Take the 2-minute tour ×

I am using 64-bit Windows Server 2008 with SQL Server 2008. And Using VSTS 2008 + C# + .Net 2.0 + IIS 7.0 + ASP.Net. When executing the following statement, I met with the following error (the error occurs when accessing an aspx page), I am not sure whether it is 64-bit system specific issue?

Sys.WebForms.PageRequestManagerServerErrorException: unregistered OLE DB access interface "Microsoft.Jet.OLEDB.4.0"

            StringBuilder sb = new StringBuilder();
            sb.AppendLine("select * from  OPENROWSET('MICROSOFT.JET.OLEDB.4.0','Excel 8.0;HDR=YES;DATABASE=" + s_path.Trim() + "',sheet1$) where name is not null");   //e:\\test1.xls
            DataSet ds = SqlUtil.ExecuteDataset(Database.StrConn, CommandType.Text, sb.ToString());
            if (ds.Tables[0].Rows.Count > 0)
                GridView_Tlinkmans.DataSource = ds;

thanks in advance, George

share|improve this question
are you sure this is working on 32 bit computer? –  ArsenMkrt Dec 31 '10 at 7:23
I believe the OleDB JET Engine is 32-bit only... –  marc_s Dec 31 '10 at 7:25
Thanks marc_s, what is the solution for 64-bit platform when implementing the same behavior? Do you have any documents to prove OleDB JET Engine only for 32-bit platform? –  George2 Dec 31 '10 at 16:35
@ArsenMkrt, sure. Why you have this ask? –  George2 Dec 31 '10 at 16:40
add comment

1 Answer

up vote 2 down vote accepted

You have one or 2 issues:

You are querying OPENROWSET in SQL Server and you have x64 SQL Server, you may need the MDAC to bridge SQL Server to ODBC/OLEDB. However, this says it is part of the OS for Win 2008+. I've had to install on Win 2003

Then you probably need this which is the closest to JET I know of: Microsoft Access Database Engine 2010 Redistributable


share|improve this answer
"MDAC to bridge SQL Server to ODBC/OLEDB" is new to me. Do you have any related documents for newcomer? From the link you provided, I do not find any tutorials for beginner. –  George2 Dec 31 '10 at 16:37
For "Microsoft Access Database Engine 2010 Redistributable", it could be used to generate Excel file? From the name, it looks like that it is for Access, not Excel. :-) –  George2 Dec 31 '10 at 16:38
add comment

Your Answer


