Hi Another problem.
<%@ Control Debug="True" Language="
VB" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.OleDb" %>
<%
Dim ConnectString As String
ConnectString = "Provider=Microsoft.Jet.OleDb.4.0;" & _
"Data Source = D:\BegASPNET\Ch15\WroxShop.mdb"
Dim SQLString As String
SQLString = "Select Tiltle, ISBN From Books"
Dim MyConnection As New OleDbConnection(ConnectString)
Dim MyCommand As New OleDbCommand(SQLString, MyConnection)
Dim MyDataReader As OleDbDataReader
Dim ResultString As String
MyConnection.Open()
MyDataReader = MyCommand.ExecuteReader()
ResultString = "<table><tr><td class = 'datatablehead'>" & _
"Today's Featured Books:</td></tr>"
Do While MyDataReader.Read()
ResultString += "<tr><td class='datatable'>"
ResultString += "<a href='http://www.wrox.com/ACON11.asp?ISBN="
ResultString += MyDataReader("ISBN") & "' target='new'>"
ResultString += MyDataReader("Title") & "</a>"
Loop
ResultString += "</table>"
Response.Write(ResultString)
MyDataReader.Close()
MyConnection.Close()
%>
No value given for one or more required parameters.
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 value given for one or more required parameters.
Source Error:
Line 19:
Line 20: MyConnection.Open()
Line 21: MyDataReader = MyCommand.ExecuteReader()
Line 22:
Line 23: ResultString = "<table><tr><td class = 'datatablehead'>" & _
Source File: D:\BegASPNET\Ch15\featuredbooks.ascx Line: 21
Mahir Ali Ahmed