Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > Other ASP.NET > ASP.NET 1.x and 2.0 Application Design
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 15th, 2004, 03:59 PM
Registered User
 
Join Date: Jun 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 'Microsoft.Jet.OLEDB4.0' provider not registere

hi,
   I am new to ASP.net. I am trying out an example of using Access database from ASP.net. But when I am trying to access the page, I am getting the following error.

[OleDbException (0x80040154): No error information available: REGDB_E_CLASSNOTREG(0x80040154).]

[InvalidOperationException: The 'Microsoft.Jet.OLEDB4.0' provider is not registered on the local machine.]
   System.Data.OleDb.OleDbConnection.CreateProviderEr ror(Int32 hr) +83
   System.Data.OleDb.OleDbConnection.CreateProvider(O leDbConnectionString constr) +107
   System.Data.OleDb.OleDbConnection.Open() +203
   System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection, ConnectionState& originalState) +44
   System.Data.Common.DbDataAdapter.FillFromCommand(O bject data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
   ASP.datacontrol1_aspx.Page_Load(Object Sender, EventArgs E) in C:\BegASPNET\Ch01\datacontrol1.aspx:21
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +731

If anyone can help me with this error, it would be great.

thank you,
Satya.

 
Old June 15th, 2004, 04:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Id' move this question to the Access forum... or the ASPX forum...


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old June 16th, 2004, 04:36 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

If u use Access fro ur ASP pages asa DataSet u r in right place!
but about ur question, can u plz send ur Code insted of error!

Always:),
Hovik Melkomian.
 
Old June 16th, 2004, 04:29 PM
Registered User
 
Join Date: Jun 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,
  Here's the code for my program.


<%@ Page Language="vb" debug="true" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script language="vb" runat="server">
Sub Page_Load(Sender As Object, E as EventArgs)

    Dim objConnection as OleDbConnection
    Dim objCommand As OleDbDataAdapter
    Dim strConnect As String
    Dim strCommand As String
    Dim DataSet1 As New DataSet

    strConnect = "Provider=Microsoft.Jet.OLEDB4.0;"
    strConnect += "Data Source=C:\BegASPNET\Ch02\grocertogo.mdb;"
    strConnect += "Persist Security Info=False"

    strCommand = "SELECT ProductName, UnitPrice FROM products"
    objConnection = New OleDbConnection(strConnect)
    objCommand = New OleDbDataAdapter(strCommand, objConnection)
    objCommand.Fill(DataSet1, "products")
    DataGrid1.DataSource=DataSet1.Tables("Products").D efaultView
    DataGrid1.DataBind()
End Sub
</script>

<html>
<head>
 <title> Data Grid Control example </title>
</head>

<body>
<asp:DataGrid id="DataGrid1" runat="server" />
</body>
</html>


thank you,
Satya.

 
Old June 17th, 2004, 02:08 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

I think you're missing a dot between OleDb and 4.0:

strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;"
strConnect += "Data Source=C:\BegASPNET\Ch02\grocertogo.mdb;"
strConnect += "Persist Security Info=False"

When in doubt with your connection strings, check out this page:

http://www.able-consulting.com/ADO_Conn.htm

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old June 17th, 2004, 03:10 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Yes Exactly u r right Imar! it should be
Code:
"...Provider=Microsoft.Jet.OLEDB.4.0;..."
In other hand I suggest to use
Code:
[u]Server.MapPath</u>
Always:),
Hovik Melkomian.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Jet connection problem istcomnet BOOK: Beginning ASP 3.0 3 February 27th, 2013 09:31 AM
Microsoft JET Database Engine (0x80040E07) gwalker_ne8 Classic ASP Databases 2 November 11th, 2006 09:32 AM
Microsoft JET Database Engine (0x80004005) kenh BOOK: Beginning ASP 3.0 4 April 6th, 2005 08:52 AM
Permission Request from Microsoft Jet Provider Griffinite Classic ASP Databases 5 December 17th, 2004 01:28 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.