469,610 Members | 2,511 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

Help - Unable to use ADO recordset as Form's Recordset

Has anyone had success with using a command collection with parameters
to run a stored procedure from sql server? I'm frustrated and have
been spending way too much time trying to make this work. If you have
a code sample, I'd love it. I've posted the code in a previous post
but didn't have any responses as to what was occurring so I'm going to
try once more.

I have a connection to SQL 7 and use a command collection with one
parameter to run a stored procedure with variable search criteria.
The statement works fine to provide me with the correct recordcounts
but I can not get the form to load the recordset values. First, I have
problems with the me.recordset = rst statement. You name it, I got
the error. I've removed the controlsource from all form control and
was using unbound controls. When I left the field names from the
recordset as the control source, the form responded with ?Name for all
controls. I need to navigate through the records. Do I need custom
controls to navigate through the recordset? The standard navigation
controls are greyed out although they are enabled. I'm using client
side cursor with static cursor type since the data won't change (in
this particular case) once its read from the sql database.

Thanks in advance.
Nov 12 '05 #1
1 2030
I remember reading that (in A2002) forms can use ADO rst as a source but
only if it is a table-based recordset. In another words, you can't use a
"dangling" recordset as the form source.
A2003 may be different.
Others - please correct me if I am wrong.
Pavel

ano1optimist wrote:

Has anyone had success with using a command collection with parameters
to run a stored procedure from sql server? I'm frustrated and have
been spending way too much time trying to make this work. If you have
a code sample, I'd love it. I've posted the code in a previous post
but didn't have any responses as to what was occurring so I'm going to
try once more.

I have a connection to SQL 7 and use a command collection with one
parameter to run a stored procedure with variable search criteria.
The statement works fine to provide me with the correct recordcounts
but I can not get the form to load the recordset values. First, I have
problems with the me.recordset = rst statement. You name it, I got
the error. I've removed the controlsource from all form control and
was using unbound controls. When I left the field names from the
recordset as the control source, the form responded with ?Name for all
controls. I need to navigate through the records. Do I need custom
controls to navigate through the recordset? The standard navigation
controls are greyed out although they are enabled. I'm using client
side cursor with static cursor type since the data won't change (in
this particular case) once its read from the sql database.

Thanks in advance.

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Skully Matjas | last post: by
9 posts views Thread by Dom Boyce | last post: by
9 posts views Thread by tym | last post: by
6 posts views Thread by doncee | last post: by
reply views Thread by Bruce | last post: by
1 post views Thread by Donald Calloway | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.