|
Hi,
I wonder if you could help me. I am trying to insert a record into a table in the database using a web form. I keep getting the following error when loading the page:
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 69: Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("@MembershipNo", System.Data.OleDb.OleDbType.Integer, 12, lblMemberID.Text))
Line 70: Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("@Resolved", System.Data.OleDb.OleDbType.VarWChar, 1, "Resolved"))
Line 71: Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("@Subtype", System.Data.OleDb.OleDbType.VarWChar, 20, ddlNotSubType.SelectedItem.Text))
Line 72: Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("@Type", System.Data.OleDb.OleDbType.VarWChar, 20, ddlNotType.SelectedItem.Text))
Line 73:
Stack Trace
[NullReferenceException: Object reference not set to an instance of an object.]
project.notification.InitializeComponent() in C:\Inetpub\wwwroot\project\notification.aspx.vb:71
project.notification.Page_Init(Object sender, EventArgs e) in C:\Inetpub\wwwroot\project\notification.aspx.vb:145
System.Web.UI.Control.OnInit(EventArgs e)
System.Web.UI.Control.InitRecursive(Control namingContainer)
System.Web.UI.Page.ProcessRequestMain()
Any ideas?
Many thanks
<Added>
I forgot to mention the error is at line 71
|
|
|
|
|
|
|
// |