C
Chumley the Walrus
In an asp.net insert data script, I'm getting an Object reference not
set to an instance of an object error on the line that creates the
parameter for @sport. Not sure why, since I am inserting the field
name correctly in the sql insert statement:
'''''
Dim InsertCmd As String = "insert into tblArticles
(sport,articleheader) values (@sport,@articleheader)"
MyCommand.Parameters.Add(New SqlParameter("@Sport",
SqlDbType.VarChar, 50))
MyCommand.Parameters("@Sport").Value =
Server.HtmlEncode(sport.Value)
''''
Here is how I am tagging the input box:
<input type="text" id="sport" value="" runat="server">
????
Thanks in advance
Chumley
set to an instance of an object error on the line that creates the
parameter for @sport. Not sure why, since I am inserting the field
name correctly in the sql insert statement:
'''''
Dim InsertCmd As String = "insert into tblArticles
(sport,articleheader) values (@sport,@articleheader)"
MyCommand.Parameters.Add(New SqlParameter("@Sport",
SqlDbType.VarChar, 50))
MyCommand.Parameters("@Sport").Value =
Server.HtmlEncode(sport.Value)
''''
Here is how I am tagging the input box:
<input type="text" id="sport" value="" runat="server">
????
Thanks in advance
Chumley