Re: Parameterized Queres

From: TLowe (noelbisspam_at_nomindspringspam.com)
Date: 04/23/04


Date: Fri, 23 Apr 2004 13:51:50 -0500

I know this is kind of late. I was having the same problem and so I changed
the cursor to the following:
adUseClient
My code then worked!

Tom

"David Schlecht" <dschl@earthlink.net> wrote in message
news:5f16df6b.0403181533.4cfc3c53@posting.google.com...
Hi All,

I haven't much hair left to pull out on this issue. Can anyone
help?

I'm converting from DAO and can't get the parameterized queries to
return a recordset.

I've tried countless approaches from the MSDN pages. My latest attempt
is:
cmd.CommandText = "[Sorted Items]"
cmd.CommandType = adCmdStoredProc
Set prm = cmd.CreateParameter("val", adInteger, adParamInput, 0, 18)
cmd.Parameters.Append prm
Set rst = cmd.Execute

The parameter value is 18 and it is returned correctly when I:
?cmd.Parameters("val").Value

Again, this always returns an empty recordset (RecordCount = -1 and
EOF = True).
I have unsuccessfully tried all other syntaxes suggested on MSDN with
the same results. This works correctly when run from within Access or
from the DAO connection.

Please help!

Thanks.
-Dave



Relevant Pages

  • Re: Parameterized Queres
    ... Please reply only to the newsgroup so that others can benefit. ... > I'm converting from DAO and can't get the parameterized queries to ... > I've tried countless approaches from the MSDN pages. ... > from the DAO connection. ...
    (microsoft.public.data.ado)
  • Parameterized Queres
    ... I'm converting from DAO and can't get the parameterized queries to ... I've tried countless approaches from the MSDN pages. ... Set prm = cmd.CreateParameter ...
    (microsoft.public.data.ado)
  • Re: Parameterized Queres
    ... >> I haven't much hair left to pull out on this issue. ... >> I'm converting from DAO and can't get the parameterized queries to ... >> I've tried countless approaches from the MSDN pages. ... >> from the DAO connection. ...
    (microsoft.public.data.ado)