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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top