Question
Web Database Development
I have been trying to Work from the book Web database
Development (Step by Step) .net Edition 2003
I have followed the code to the letter. However, I am having a problem. I choose to use dreamweaver instead of Microsoft visual studio 2003, which is installed on my machine.
I have been getting this error messege.
===================================error Message=========================================
Server Error in '/' Application.
--------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30002: Type 'OleDbConnection' is not defined.
Source Error:
Line 6: <script runat="server">
Line 7: Sub Page_Load(sender As Object, e As EventArgs)
Line 8: Dim conClsf As OleDbConnection
Line 9: Dim cmbMbrs As OleDbCommand
Line 10: Dim rdrMbrs As OleDataReader
Source File: C:\Inetpub\wwwroot\asp testing\members.aspx Line: 8
=========================================error message========================================
=========================================here is my code============================================
<%@ Page Language="vb" Debug="true" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb%>
<html>
<head>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim conClsf As OleDbConnection
Dim cmbMbrs As OleDbCommand
Dim rdrMbrs As OleDataReader
conClsf = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & server.mappath("classified.mdb") & ";")
conClsf.Open
cmdMbrs = New OleDbCommand("select * from members order by memberid", conClsf)
rdrMbrs =cmdMbrs.ExecuteReader
gridMbrs.DataSource = rdrMbrs
gridMbrs.DataBind
rdrMbrs.Close
cmdMbrs.Dispose
conClsf.Close
End Sub
</script>
<title>Classified Ad Members</title>
</head>
<body>
<h1>Classifid Ad Members</h1>
<asp:DataGrid ID="gridMbrs" runat="server" />
</asp:DataGrid>
</body>
</html>
==============================================end my code==========================================
Any help in correcting this matter would be greatly appreciated
I have followed the code to the letter. However, I am having a problem. I choose to use dreamweaver instead of Microsoft visual studio 2003, which is installed on my machine.
I have been getting this error messege.
===================================error Message=========================================
Server Error in '/' Application.
--------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30002: Type 'OleDbConnection' is not defined.
Source Error:
Line 6: <script runat="server">
Line 7: Sub Page_Load(sender As Object, e As EventArgs)
Line 8: Dim conClsf As OleDbConnection
Line 9: Dim cmbMbrs As OleDbCommand
Line 10: Dim rdrMbrs As OleDataReader
Source File: C:\Inetpub\wwwroot\asp testing\members.aspx Line: 8
=========================================error message========================================
=========================================here is my code============================================
<%@ Page Language="vb" Debug="true" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb%>
<html>
<head>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim conClsf As OleDbConnection
Dim cmbMbrs As OleDbCommand
Dim rdrMbrs As OleDataReader
conClsf = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & server.mappath("classified.mdb") & ";")
conClsf.Open
cmdMbrs = New OleDbCommand("select * from members order by memberid", conClsf)
rdrMbrs =cmdMbrs.ExecuteReader
gridMbrs.DataSource = rdrMbrs
gridMbrs.DataBind
rdrMbrs.Close
cmdMbrs.Dispose
conClsf.Close
End Sub
</script>
<title>Classified Ad Members</title>
</head>
<body>
<h1>Classifid Ad Members</h1>
<asp:DataGrid ID="gridMbrs" runat="server" />
</asp:DataGrid>
</body>
</html>
==============================================end my code==========================================
Any help in correcting this matter would be greatly appreciated
