473,404 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

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 2173
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Skully Matjas | last post by:
I am using the following code (created by the wizard) to allow to bring my form to a particular entery. But when I edit the entery (ex: put new information into a blank cell), it puts that record...
1
by: Skully Matjas | last post by:
Thank you for getting back to me. I am very new at this so i didnot understand what you said, here i will give as much cetails as possible: 1) The combo box i am using is combox39 2) I imported...
9
by: Dom Boyce | last post by:
Hi First up, I am using MS Access 2002. I have a database which records analyst rating changes for a list of companies on a daily basis. Unfortunately, the database has been set up (by my...
9
by: tym | last post by:
HELP!!! I'm going round the twist with this... I have a VB6 application which is using DAO to access a database (Please - no lectures on ADO, I know what I'm doing with DAO!!) Ok, problem...
6
by: doncee | last post by:
Using a multi select list box to open several records in a pre - defined form. Most of the code that follows is taken from a posting by Alan Browne on his web site. The click routine is supposed...
10
by: 60325 | last post by:
This is the page where I collect the data in drop-down boxes with values of 1-10 and send it to a submitted page to do calculations. Example: Employee1 TeamScore(1-10) Employee2 ...
5
by: Henrik | last post by:
The problem is (using MS Access 2003) I am unable to retrieve long strings (255 chars) from calculated fields through a recordset. The data takes the trip in three phases: 1. A custom public...
0
by: Bruce | last post by:
I need to re-write an old .ASP application in a C# webservice. No problem, right? Well, I also need to use a DCom object to connect to our SAP system. Unfortunately, I'm unable to make that work....
1
by: Donald Calloway | last post by:
I have created a database application that uses a macro, activated by a button click event, that runs a query which returns a recordset consisting of a subset of the matching database record, and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.