Hi,
What is wrong with this code ? I got this error:
" Line 1: Incorrect syntax near 'sp_Collect'. "
which appears at the last line when | call the cm.ExecuteScala r . The sp
takes an int ID and returns a string Data. Using the debugger, I see that the
value of ID is correct.
Is this a C# problem, or SQL Server 7 problem ?
public string GetID(int ID)
{
SqlCommand cm = new SqlCommand("sp_ Collect'", sqlCon);
cm.Parameters.A dd(new SqlParameter("@ ID", ID));
return (string) cm.ExecuteScala r();
}
Thanks
Andrew
What is wrong with this code ? I got this error:
" Line 1: Incorrect syntax near 'sp_Collect'. "
which appears at the last line when | call the cm.ExecuteScala r . The sp
takes an int ID and returns a string Data. Using the debugger, I see that the
value of ID is correct.
Is this a C# problem, or SQL Server 7 problem ?
public string GetID(int ID)
{
SqlCommand cm = new SqlCommand("sp_ Collect'", sqlCon);
cm.Parameters.A dd(new SqlParameter("@ ID", ID));
return (string) cm.ExecuteScala r();
}
Thanks
Andrew
Comment