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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top