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

ADO in Access 2K and Grid Controls

P: n/a
SAM
Hey guys,

Long time Access programmer, but never had to bother with these
things until now. First, I use ADO all the time in VB, but now
I need to use it in Access 2K. I never remember/know how to
link the required libraries to get ADO functionality. It was
easy enough in VB. Second, I've been surviving so far with
subforms but I really want to try out a grid control. I
registered a grid control that was available from ordinary
Access 2K, but I can't figure out how to load it up with
data. The main reason is that I want to avoid maintaining
continuous links to an Access backend database because there
are several users connected to the centralized datastore and
it is affecting performance. I can generically manage the
data on the main form, but using subforms, they are still
connected to a table/query which kind of defeats the purpose.
If grid controls in VB work the same way, that could be
the answer to one of my other problems/solutions.

Finally, I have a client who has an Access 97 database and
needs to upgrade it to XP. I've done many 97-2K upgrades
without any problems. Today, one of the databases generated
an error due to some old DAO syntax that is not supported in
2K. I know where it is choking, so it's just a matter of
recoding. Is anyone out there aware of 2K-XP upgrade issues?

Thanks in advance for any help.

SAM
PS. The above email doesn't work, so please just reply here.
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi, Sam!

Lot of questions in one post there!

I'll start with the last, because I'm surest of that:
The DAO library is included in Access 97 by default; the ADO library in
Access 2000 and later.
So you'll need to go into Tools - References (from any code window) and add
a reference to the DAO library.
Assuming that code isn't using ADO, you might want to remove that reference,
so you won't run into ambiguities like Dim rs as Recordset.

Moving back to your first question, the libraries for ADO should be
included by default in an Access mdb or adp application. (You haven't said
which you're doing.)

As for grid controls, I don't think any are distributed with Access
natively. Since you say you've worked in VB, I'm guessing you've got a VB
grid control you're trying to use in Access. This is not necessarily a
problem, but you should be aware that you'll need to distribute that control
to your users with your application, and provide a way to register it on
their machines.

That said, I think there are unbound grid controls out there, but I haven't
used them. (I'd suggest looking in the VB Help files for ideas.) One thing
I have done is this: Put an ADO Data Control on a form. Create a
disconnected ADO recordset, and point the ADO Data Control's Recordset
property to it. Then bind the ADO DataControl to an ADO Grid. The data
fills the grid, and is disconnected from the source, so it doesn't refresh
automatically.

HTH
- Turtle
"SAM" <ga*********@hotmail.com> wrote in message
news:98**************************@posting.google.c om...
Hey guys,

Long time Access programmer, but never had to bother with these
things until now. First, I use ADO all the time in VB, but now
I need to use it in Access 2K. I never remember/know how to
link the required libraries to get ADO functionality. It was
easy enough in VB. Second, I've been surviving so far with
subforms but I really want to try out a grid control. I
registered a grid control that was available from ordinary
Access 2K, but I can't figure out how to load it up with
data. The main reason is that I want to avoid maintaining
continuous links to an Access backend database because there
are several users connected to the centralized datastore and
it is affecting performance. I can generically manage the
data on the main form, but using subforms, they are still
connected to a table/query which kind of defeats the purpose.
If grid controls in VB work the same way, that could be
the answer to one of my other problems/solutions.

Finally, I have a client who has an Access 97 database and
needs to upgrade it to XP. I've done many 97-2K upgrades
without any problems. Today, one of the databases generated
an error due to some old DAO syntax that is not supported in
2K. I know where it is choking, so it's just a matter of
recoding. Is anyone out there aware of 2K-XP upgrade issues?

Thanks in advance for any help.

SAM
PS. The above email doesn't work, so please just reply here.

Nov 12 '05 #2

P: n/a
SAM
Thanks. I was looking in the wrong place to find the reference to
ADO. I've seen an application that has both DAO and ADO references.
They just ensure that when they declare it is prefixed with DAO.Recordset
or ADO.Recordset. Still, I don't think that it is a good idea to
do that.

The concept of an *.adp is new for me. Is that an XP thing? I just
received a file from a client that I can open but not run on my
machine. It has a slightly different icon and the QUERY tab is
replace by a Stored Procedure tab. The code that I've seen so
far is fairly normal, though. I don't have XP yet to try out.

I'm just messing around with grid controls until I figure out
how they work. So far, I'm still trying to get into the basics.

SAM

"MacDermott" <ma********@nospam.com> wrote in message news:<X6******************@newsread3.news.atl.eart hlink.net>...
Hi, Sam!

Lot of questions in one post there!

I'll start with the last, because I'm surest of that:
The DAO library is included in Access 97 by default; the ADO library in
Access 2000 and later.
So you'll need to go into Tools - References (from any code window) and add
a reference to the DAO library.
Assuming that code isn't using ADO, you might want to remove that reference,
so you won't run into ambiguities like Dim rs as Recordset.

Moving back to your first question, the libraries for ADO should be
included by default in an Access mdb or adp application. (You haven't said
which you're doing.)

As for grid controls, I don't think any are distributed with Access
natively. Since you say you've worked in VB, I'm guessing you've got a VB
grid control you're trying to use in Access. This is not necessarily a
problem, but you should be aware that you'll need to distribute that control
to your users with your application, and provide a way to register it on
their machines.

That said, I think there are unbound grid controls out there, but I haven't
used them. (I'd suggest looking in the VB Help files for ideas.) One thing
I have done is this: Put an ADO Data Control on a form. Create a
disconnected ADO recordset, and point the ADO Data Control's Recordset
property to it. Then bind the ADO DataControl to an ADO Grid. The data
fills the grid, and is disconnected from the source, so it doesn't refresh
automatically.

HTH
- Turtle
"SAM" <ga*********@hotmail.com> wrote in message
news:98**************************@posting.google.c om...
Hey guys,

Long time Access programmer, but never had to bother with these
things until now. First, I use ADO all the time in VB, but now
I need to use it in Access 2K. I never remember/know how to
link the required libraries to get ADO functionality. It was
easy enough in VB. Second, I've been surviving so far with
subforms but I really want to try out a grid control. I
registered a grid control that was available from ordinary
Access 2K, but I can't figure out how to load it up with
data. The main reason is that I want to avoid maintaining
continuous links to an Access backend database because there
are several users connected to the centralized datastore and
it is affecting performance. I can generically manage the
data on the main form, but using subforms, they are still
connected to a table/query which kind of defeats the purpose.
If grid controls in VB work the same way, that could be
the answer to one of my other problems/solutions.

Finally, I have a client who has an Access 97 database and
needs to upgrade it to XP. I've done many 97-2K upgrades
without any problems. Today, one of the databases generated
an error due to some old DAO syntax that is not supported in
2K. I know where it is choking, so it's just a matter of
recoding. Is anyone out there aware of 2K-XP upgrade issues?

Thanks in advance for any help.

SAM
PS. The above email doesn't work, so please just reply here.

Nov 12 '05 #3

P: n/a
"SAM" <ga*********@hotmail.com> wrote in message
news:98**************************@posting.google.c om...
Thanks. I was looking in the wrong place to find the reference to
ADO. I've seen an application that has both DAO and ADO references.
They just ensure that when they declare it is prefixed with DAO.Recordset
or ADO.Recordset. Still, I don't think that it is a good idea to
do that.

The concept of an *.adp is new for me. Is that an XP thing? I just
received a file from a client that I can open but not run on my
machine. It has a slightly different icon and the QUERY tab is
replace by a Stored Procedure tab. The code that I've seen so
far is fairly normal, though. I don't have XP yet to try out.

I'm just messing around with grid controls until I figure out
how they work. So far, I'm still trying to get into the basics.

SAM

....a Stored Procedure tab? This looks like you are looking at an adp file
with Access 2000. But, on it's own, getting Access XP won't help. You need
to be running a SQL Server database (or MSDE). What is the file extension?
Have a look at the following:
http://msdn.microsoft.com/library/de...html/apg01.asp
Fletcher
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.