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!
--
Joe Fallon
"Suresh" <an*******@discussions.microsoft.com> wrote in message
news:6C**********************************@microsof t.com...
How do you add multiple parameters (@strParm01, @strParm02 ect.) and
their respective values?
Almost the same way you are doing now.
prmWebDocGroup = cmdWebDocGroup.Parameters.Add("@strParm00",
OleDbType.VarChar, 30) prmWebDocGroup.Value = "FindDocList"
Instead try the following,
cmdWebDocGroup.Parameters.Add(New OleDbParameter("@strParm00",
OleDbType.VarChar, 30)) cmdWebDocGroup.Parameters("@strParm00").Value = "FindDocList"
cmdWebDocGroup.Parameters.Add(New OleDbParameter("@strParm01",
OleDbType.Integer)) cmdWebDocGroup.Parameters("@strParm01").Value = "FindDocList1"
cmdWebDocGroup.Parameters.Add(New OleDbParameter("@strParm02",
OleDbType.Date)) cmdWebDocGroup.Parameters("@strParm02").Value = "FindDocList2"
cmdWebDocGroup.Parameters.Add(New OleDbParameter("@strParm03",
OleDbType.VarChar, 30)) cmdWebDocGroup.Parameters("@strParm03").Value = "FindDocList3"
.....
Suresh.
----- Steven K wrote: -----
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?
--
Thanks in advance,
Steven