M
Moe Sizlak
Hi,
I am using an SQL parameter in my SQL statement, I have never done this
before ans it seems to be retuning an error saying that the parameter '@ID'
must be declared, I know I am close, could someone have a look at it form me
please?
cheers lads
Moe
Dim DS As New DataSet()
Dim sqlCMD as new sqlCommand
sqlCMD.parameters.add(New SqlParameter("@ID", SqlDbType.Int, 4))
sqlCMD.parameters("@ID").value = PersonID
Dim strConnect As New
SqlConnection(ConfigurationSettings.AppSettings("connectionString"))
Dim objSQLAdapter As New SQLDataAdapter("SELECT FROM table WHERE person=
@ID", strConnect)
objSQLAdapter.Fill(DS, "table")
Server Error in '/test' Application.
I am using an SQL parameter in my SQL statement, I have never done this
before ans it seems to be retuning an error saying that the parameter '@ID'
must be declared, I know I am close, could someone have a look at it form me
please?
cheers lads
Moe
Dim DS As New DataSet()
Dim sqlCMD as new sqlCommand
sqlCMD.parameters.add(New SqlParameter("@ID", SqlDbType.Int, 4))
sqlCMD.parameters("@ID").value = PersonID
Dim strConnect As New
SqlConnection(ConfigurationSettings.AppSettings("connectionString"))
Dim objSQLAdapter As New SQLDataAdapter("SELECT FROM table WHERE person=
@ID", strConnect)
objSQLAdapter.Fill(DS, "table")
Server Error in '/test' Application.