|
|
 |
| 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

June 15th, 2004, 04:59 PM
|
|
Registered User
|
|
Join Date: Jun 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
'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.
|

June 15th, 2004, 05:06 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
Id' move this question to the Access forum... or the ASPX forum...
Hal Levy
Web Developer, PDI Inc.
NOT a Wiley/Wrox Employee
|

June 16th, 2004, 05:36 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Tehran, Iran
Posts: 922
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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.
|

June 16th, 2004, 05:29 PM
|
|
Registered User
|
|
Join Date: Jun 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

June 17th, 2004, 03:08 AM
|
 |
Wrox Author
Points: 33,554, Level: 80 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,228
Thanks: 7
Thanked 203 Times in 201 Posts
|
|
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.
|

June 17th, 2004, 04:10 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Tehran, Iran
Posts: 922
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |