I'm sure I'm just tired and will feel really stupid when I find out the answer, but I have a Web Page that when it tries to set Insert Parameters gives me a NullReferenceException (see subject)
The specific method is :
protected void frmChgRequest_Inserting(object sender, FormViewInsertEventArgs e) {
SqlChgRequest.InsertParameters["ChgID"].DefaultValue = chgIDComplete.ToString();
SqlChgRequest.InsertParameters["RequestDate"].DefaultValue = DateTime.Now.ToString();
}
The error occurs on the first InsertParameters statement. The obvious answer is that the stringbuilder "chgIDComplete" is null, but on debug, it shows a value of "MERCHANT2008115HW". A stringbuilder should have no problem converting to a string. What am I doing wrong?
Anna HawksPosted Jan 17, 2008, 11:35 AM
I've solved the problem. Don't know how offhand, but it's fixed.
Thanks for all the input!
Guest UserPosted Jan 17, 2008, 10:53 AM
http://www.aspfree.com/c/a/ASP.NET/Programmatically-Updating-Databases-using-ASPNET-20-SqlDataSource/2/
Guest UserPosted Jan 17, 2008, 10:42 AM
Anna HawksPosted Jan 17, 2008, 9:19 AM
Guest UserPosted Jan 16, 2008, 8:56 PM