Sql Server Migration

  • Thread starter Thread starter Nitin
  • Start date Start date
N

Nitin

I used access as backend for a website and it worked perfectly fine.
Now i have changed to MS SQL Server 2000. The page gives an error "Must
declare the variable '@CategoryId'. " (@categoryid is a oledb parameter)
when I remove all the parameters and create the query using string.format it
works fine.
I am using oledb provider.
Can any one figure out what's the problem
Regards
 
I have figured out the problem. In the query i was using @categoryid as the
parameter place holder, now i am using '?' and it works fine.
Regards
 
If you're using Sql Server 2000 now, you should really be using the
SqlClient library to connect to it (and change the? back to a
@CategoryId).

Using the OleDb provider will hurt your peformance.

HTH
Andy
 
Back
Top