By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,136 Members | 2,135 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,136 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.