OleDbParameter Query: Multiple parameters

S

Steven K

Hello,

I am calling a SQL Server 2K parameter query with the following:

Dim spWebDocGroup As OleDb.OleDbDataReader
Dim prmWebDocGroup As OleDbParameter
Dim cmdWebDocGroup As New OleDb.OleDbCommand("zsp_web_WebDocument",
cnnSearch)
cmdWebDocGroup.CommandType = CommandType.StoredProcedure
prmWebDocGroup = cmdWebDocGroup.Parameters.Add("@strParm00",
OleDbType.VarChar, 30)
prmWebDocGroup.Value = "FindDocList"

How do you add multiple parameters (@strParm01, @strParm02 ect.) and their
respective values?
 
J

Joe Fallon

One other tip:
OLEDB named parameters don't work the way that SQL named parameters do.
The sequence that you create the OLEDB param is what is used! Not the name.
So build them in the sequence you plan to use them!
I lost an hour to that little nuance!
 

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

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top