codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Insert Server Error (Newbie)  ml3bf at 10:30 on Sunday, February 15, 2004
 

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








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Problem with concatenation
•  how to genrates the crystal report by sending a id at runtime
•  help me
•  pls help me with this..
•  Re: Security - Code verify
•  Job @ EarlySail
•  Job @ EarlySail (perl)
•  IPC problem
•  Re: import contacts of msn/yahoo


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007