A
Alex Shirley
Hi
I've got a SQL Server/ASP.Net(VB) problem.
This statement works when I run it on SQL Server as a standard query:
SELECT blagh FROM blagh WHERE blagh.blaghID IN (1,2,3,4,5)
If I change the SQL statement to read:
SELECT blagh FROM blagh WHERE blagh.blaghID IN (@blaghID)
And set in my ASP.Net code this parameter:
SqlMyStatement.Parameters("@blaghID").Value = "1"
This will work fine as well.
But, if I set up this parameter instead:
SqlMyStatement.Parameters("@blaghID").Value = "1,2,3,4,5"
…I get this error message in my ASP.Net Application:
"input string was not in a correct format"
Any idea what I'm doing wrong?
Thanks!!
Alex
I've got a SQL Server/ASP.Net(VB) problem.
This statement works when I run it on SQL Server as a standard query:
SELECT blagh FROM blagh WHERE blagh.blaghID IN (1,2,3,4,5)
If I change the SQL statement to read:
SELECT blagh FROM blagh WHERE blagh.blaghID IN (@blaghID)
And set in my ASP.Net code this parameter:
SqlMyStatement.Parameters("@blaghID").Value = "1"
This will work fine as well.
But, if I set up this parameter instead:
SqlMyStatement.Parameters("@blaghID").Value = "1,2,3,4,5"
…I get this error message in my ASP.Net Application:
"input string was not in a correct format"
Any idea what I'm doing wrong?
Thanks!!
Alex