SQL Server Migration

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
 
N

Nitin

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
 
H

Hans Kesting

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

Just a note: there are SqlServer-specific classes that you can use
instead of OleDb.

Hans Kesting
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top