Forums

This topic is locked

Connecting To Database Error

Posted 10 Sep 2005 20:11:46
1
has voted
10 Sep 2005 20:11:46 john europhreak posted:
I'm new to this so please help me. i'm Dreamweaver mx 2004 to create my web sites. i wanted to use database on one of my pages but everytime i try to connect it i get an error. here's my code:

<%@ Page Language="VB" debug="true" ContentType="text/html" ResponseEncoding="iso-8859-1" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "www.w3.org/TR/html4/loose.dtd">
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script language="vb" runat="server">
sub Page_load(sender as Object, e as EventArgs)
dim myConn as new OleDbConnection("Provider=Microsoft.Jet.OLEB.4.0;" & "Data Source=C:\Inetpub\wwwroot\Project\database\classifieds.mdb"
'open connection
dim myCmd as new OleDbDataAdapter("select * from tblUsers", myConn)
'fill dataset
dim ds as DataSet = new DataSet()
myCmd.Fill(ds, "tblUsers"
'select data view and bind to server controls
end sub
</script>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Contact Form</title>
</head>
<body>

</body>
</html>


---------------------------
when i try to run this i get line 11 error
No error information available: REGDB_E_CLASSNOTREG(0x80040154).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: No error information available: REGDB_E_CLASSNOTREG(0x80040154).

Source Error:

Line 11: myCmd.Fill(ds, "tblUsers"

what is going on. i'm not even doing anything with this yet and already i get errors?

Replies

Replied 07 Nov 2006 10:24:00
07 Nov 2006 10:24:00 Txema Zapater replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I'm new to this so please help me. i'm Dreamweaver mx 2004 to create my web sites. i wanted to use database on one of my pages but everytime i try to connect it i get an error. here's my code:

&lt;%@ Page Language="VB" debug="true" ContentType="text/html" ResponseEncoding="iso-8859-1" %&gt;&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "www.w3.org/TR/html4/loose.dtd"&gt;
&lt;%@ Import Namespace="System.Data" %&gt;
&lt;%@ Import Namespace="System.Data.OleDb" %&gt;
&lt;script language="vb" runat="server"&gt;
sub Page_load(sender as Object, e as EventArgs)
dim myConn as new OleDbConnection("Provider=Microsoft.Jet.OLEB.4.0;" & "Data Source=C:\Inetpub\wwwroot\Project\database\classifieds.mdb"
'open connection
dim myCmd as new OleDbDataAdapter("select * from tblUsers", myConn)
'fill dataset
dim ds as DataSet = new DataSet()
myCmd.Fill(ds, "tblUsers"
'select data view and bind to server controls
end sub
&lt;/script&gt;

&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;
&lt;title&gt;Contact Form&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;/body&gt;
&lt;/html&gt;


---------------------------
when i try to run this i get line 11 error
No error information available: REGDB_E_CLASSNOTREG(0x80040154).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: No error information available: REGDB_E_CLASSNOTREG(0x80040154).

Source Error:

Line 11: myCmd.Fill(ds, "tblUsers"

what is going on. i'm not even doing anything with this yet and already i get errors?

<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Hi,

Check the provider name, there must be OLEDB, not OLEB.

Bye...

Reply to this topic