VW2005 and VW2008


Nov 9, 2009
Programming Experience

I recently moved my project to VW2008 from V2005 but is now having problems running it. Basically I have a web form which connects to a SQL server database. I do insert data via the form when the submit button is clicked. I am using StoredProcedure for this. I had to make changes to the button click event because VW2008 was asking for WithEvents declaration.

- My stored procedure statement just goes like this:
INSERT INTO Student (firstname, surname) VALUES (@firstname,@surname)

- The code:
Protected Sub submitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim studentDetails As New SqlDataSource


        Catch ex As Exception
        End Try
    End Sub

I am using the GUI to drag n drop items to the form and I modified the 'Insert' properties to 'StoredProcedure' for the data source. In the list of parameters I point each variable to a control. I deleted the auto-generated 'RETURN_VALUE' though because I was getting errors. I dont know if that makes any difference.

The error am getting is:
- A first chance exception of type 'System.NotSupportedException' occurred in System.Web.dll

And when I use debugger, in the insert parameters there is under 'Item' :
Item In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user. System.Web.UI.WebControls.Parameter

Any help on this?
Top Bottom