What is going wrong here?

DumAsp

Newcomer
Joined
Oct 4, 2005
Messages
15
Location
Ontario Canada
Here is the code ( as generated in VisualStudio.net)
Code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        If Not IsPostBack Then OleDbDataAdapter1.Fill(DataSet11)
    End Sub

The problem is i keep getting an error
Server Error in '/Scheduler' Application.
--------------------------------------------------------------------------------

Value cannot be null. Parameter name: dataSet
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.ArgumentNullException: Value cannot be null. Parameter name: dataSet

Source Error:


Line 70: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Line 71: 'Put user code to initialize the page here
Line 72: If Not IsPostBack Then OleDbDataAdapter1.Fill(DataSet11)
Line 73: End Sub
Line 74:


Source File: C:\Inetpub\wwwroot\Scheduler\RScheduler.aspx.vb Line: 72

Stack Trace:


[ArgumentNullException: Value cannot be null.
Parameter name: dataSet]
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
Scheduler.WebForm1.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\Scheduler\RScheduler.aspx.vb:72
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()

All it has to do is put the resource names into the dropdown box. There are no nulls in the data, as it keeps telling me there is.

HELP ME!!!!!!
 
PlausiblyDamp said:
When you call the .Fill method what is the value of DataSet11 -?


I don't know. How do I view this value?

as a side note. I was very adept in clasic asp. I've written some very elegant apps in it. Asp.Net on the other hand I am completely lost. But I can see the potential power of this language and DESPERATELY want to understand it. The Client and server division is blurry for me. The web controls are a bit of a mystery. I'm sorry (and embarrassed) at what a Noob I must seem.
 
More frustration....


when I went to run the code to look for the dataset value I got a new error:


Server Error in '/Scheduler' Application.
--------------------------------------------------------------------------------

Could not lock file.
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: Could not lock file.

Source Error:


Line 70: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Line 71: 'Put user code to initialize the page here
Line 72: If Not IsPostBack Then OleDbDataAdapter1.Fill(DataSet13)
Line 73: End Sub
Line 74:


Source File: C:\Inetpub\wwwroot\Scheduler\RScheduler.aspx.vb Line: 72

Stack Trace:


[OleDbException (0x80004005): Could not lock file.]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
System.Data.OleDb.OleDbConnection.InitializeProvider()
System.Data.OleDb.OleDbConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
Scheduler.WebForm1.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\Scheduler\RScheduler.aspx.vb:72
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
 
Back
Top