Problem: Chaptr 4 -Data Reader Example
I am having a problem getting the Advance Data Reader Example, pp.100-101 to execute successfully. Reviewing the example on p. 100, according to the namespace System.Data.SqlClient, the database should be a SQL Server db. However according to the last line, under 1., the database used is NWind, which in my downloaded db's is a MS Access db. I changed the last line to reflect the northwind sql db and I am getting the error message: Connection String has not been initialize. I added the Trace="true" this is what I received:
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
Request Details
Session Id: lcxldsmq3ce3xj45jcmw5mm1 Request Type: GET
Time of Request: 9/9/2006 2:40:21 AM Status Code: 500
Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)
Trace Information
Category Message From First(s) From Last(s)
aspx.page Begin Init
aspx.page End Init 0.000025 0.000025
Unhandled Execution Error
The ConnectionString property has not been initialized.
at System.Data.SqlClient.SqlConnection.Open()
at ASP.Datareader_aspx.Page_Load(Object Source, EventArgs E)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain() 0.014846 0.014822
Control Tree
Control Id Type Render Size Bytes (including children) Viewstate Size Bytes (excluding children)
Cookies Collection
Name Value Size
ASP.NET_SessionId lcxldsmq3ce3xj45jcmw5mm1 42
I even Commented the Dim String Connection statement and falling back to the SQL Connection String that worked in previous examples and I still get the Connection String error.
Any and all assistance is welcomed. Thanks in advance.
__________________
Disclaimer: The above comments are solely the opinion of one person and not to be construed as a directive or an incentive to commit fraudulent acts.
|