473,657 Members | 2,418 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Call Database in ADO For Table Linking

Hi all:

I am using Access 2002, and of course, when I copied the solution from
the Solutions.mdb to link tables at startup, I got an area using the
code supplied.

I have since tried a variety of other calls, to no avail.
Below is sample code.

Could someone provide:
1) Correct code
2) Type library I need to be connected to.

I would like to use ADO rather than DAO.

Thanks!

amy
===
Dim db As ado.Database
Dim rst As ado.Recordset

Set rst = CurrentDb

' Open linked table to see if connection information is correct.
On Error Resume Next
Set rst = dbs.OpenRecords et("Fees_be")
Nov 13 '05 #1
6 1662
Database is a DAO object.
CurrentDb is supplied by DAO.
TableDef is a DAO object, and so on.

Why would you want to use ADO and the associated problems and
inconsistencies of the ADOX library versions, when DAO is the native Access
library?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"amywolfie" <am*******@veri zon.net> wrote in message
news:33******** *************** ***@posting.goo gle.com...

I am using Access 2002, and of course, when I copied the solution from
the Solutions.mdb to link tables at startup, I got an area using the
code supplied.

I have since tried a variety of other calls, to no avail.
Below is sample code.

Could someone provide:
1) Correct code
2) Type library I need to be connected to.

I would like to use ADO rather than DAO.

Thanks!

amy
===
Dim db As ado.Database
Dim rst As ado.Recordset

Set rst = CurrentDb

' Open linked table to see if connection information is correct.
On Error Resume Next
Set rst = dbs.OpenRecords et("Fees_be")

Nov 13 '05 #2
I was thinking ahead in case I have to upsize the backend to SQL.

But in order to use the DAO command, which Type Library do I need to activiate?

Thanks!
amy
===
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message news:<40******* *************** @per-qv1-newsreader-01.iinet.net.au >...
Database is a DAO object.
CurrentDb is supplied by DAO.
TableDef is a DAO object, and so on.

Why would you want to use ADO and the associated problems and
inconsistencies of the ADOX library versions, when DAO is the native Access
library?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"amywolfie" <am*******@veri zon.net> wrote in message
news:33******** *************** ***@posting.goo gle.com...

I am using Access 2002, and of course, when I copied the solution from
the Solutions.mdb to link tables at startup, I got an area using the
code supplied.

I have since tried a variety of other calls, to no avail.
Below is sample code.

Could someone provide:
1) Correct code
2) Type library I need to be connected to.

I would like to use ADO rather than DAO.

Thanks!

amy
===
Dim db As ado.Database
Dim rst As ado.Recordset

Set rst = CurrentDb

' Open linked table to see if connection information is correct.
On Error Resume Next
Set rst = dbs.OpenRecords et("Fees_be")

Nov 13 '05 #3
"amywolfie" <am*******@veri zon.net> wrote in message
news:33******** *************** ***@posting.goo gle.com...
I was thinking ahead in case I have to upsize the backend to SQL.


FWIW I've been using SQL Server back ends for years and have yet to write my
first line of ADO code.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #4
The library is:
Microsoft DA0 3.6

More information about references:
http://allenbrowne.com/ser-38.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"amywolfie" <am*******@veri zon.net> wrote in message
news:33******** *************** ***@posting.goo gle.com...
I was thinking ahead in case I have to upsize the backend to SQL.

But in order to use the DAO command, which Type Library do I need to activiate?
Thanks!
amy
===

Nov 13 '05 #5
am*******@veriz on.net (amywolfie) wrote in message news:<33******* *************** ****@posting.go ogle.com>...
I was thinking ahead in case I have to upsize the backend to SQL.

But in order to use the DAO command, which Type Library do I need to activiate?

Thanks!
amy
===


Microsoft DAO 3.X Object Library (If you're using 2000 or later, it's version 3.6).
Nov 13 '05 #6
Thanks everyone for your help. I opted for ADO since I was involved
in upsizing a very large Access database with reams of DAO code to
SQL, and the developer ended up rewriting that code in ADO.

From what you're saying, that wasn't entirely necessary.

Thanks!
amy
===
pi********@hotm ail.com (Pieter Linden) wrote in message news:<bf******* *************** ****@posting.go ogle.com>...
am*******@veriz on.net (amywolfie) wrote in message news:<33******* *************** ****@posting.go ogle.com>...
I was thinking ahead in case I have to upsize the backend to SQL.

But in order to use the DAO command, which Type Library do I need to activiate?

Thanks!
amy
===


Microsoft DAO 3.X Object Library (If you're using 2000 or later, it's version 3.6).

Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1217
by: Shyam Singh | last post by:
I have two database Student and Course both have a relation on it. Student ID is the primary key for Student Table and Course ID is the primary key for course table. As per my logic, one student can enroll for different courses. Say X person can enrol for Y1, y2, y3 courses. I want to store data in the database in the format X/Y1 if the MR X person enrols for Y1 course and according X/Y2 if he enrolls for Y2 course and so on. Please...
2
12390
by: Wilder | last post by:
I'm trying to update a field in one table with the minimum values of the field in another table. The two tables are linked via a common field. I want to populate a date field in one table with the earliest date in another table where the linking fields values are equal. I set up a query with the two tables, made sure the common fields were linked, set the query as an "update" query, placed the field and table I want to update in the...
0
2240
by: gasturbtec | last post by:
please help im new at access programming and i just got this project dropped in my lap because the old programmer quit. i've been doing ok so far but now i need to add code to an existing database that is used to connect to other databases and generate reports. below is sample code of how the database does the linking i hope i give you enough info to help me but if not let me know and i will give more. Sub txtShipDataFileSub() Dim...
3
6760
by: Ken Davis via AccessMonster.com | last post by:
I get this error message when trying to compact and repair my database: (Could not find field "Description"). When I clicked on Help, the error message number comes up as (Error 3799) It's the first time I see this. Help anyone? -- Message posted via http://www.accessmonster.com
1
2330
by: gopinathanr | last post by:
I am having a VB 6.0 program where I am using an MS Access database. This database has some tables that have been created by linking to MySql database using the MySQL ODBC 3.51 Driver. When I try to create a table by linking to the MySql server it is showing the following error : -2147417851 Automation error. The server threw an exception. The command I am using is acc.DoCmd.TransferDatabase where acc is my Access application. Could...
3
2773
by: vonclausowitz | last post by:
Hi All, I was thinking of creating a table in my database to index all words in the database. That way I can quickly search for one or more words and the index table will return the words and records I need. For example the iTable would look like this:
8
2699
by: rdemyan via AccessMonster.com | last post by:
I've converted my application from A2K format to A2003 format. I tried to follow Allen Browne's protocol in getting my app into A2003 (although I was unable to find informtion on the conversion process). Lots of decompiling and lots of compacting of the original application in A2000. Then the app was opened in A2003 and compacted, decompiled and compacted. Next I imported everything into a blank A2003 database. Then this db was...
2
2716
by: Peter Sutton | last post by:
I want to create a new table in a linked database and then link to it from the front end. The name of the table is tblUserLookups and the external (backend) database is ADAS_Data.mdb. The following code creates the table OK Set ws = DBEngine(0) str = GetCurrentPath() & "ADAS_Data.MDB"
7
2856
by: coolsti | last post by:
I have the task to set up an application at work,using MS Access as a front end to a MySQL database. This will be done using an appropriate ODBC driver, and linking the MySQL database to Access. My question is whether it is possible to set something up so that when linking to the MySQL database, the user name which is used for the MySQL connection is taken as the user's Windows ID. If so, then I can set up users and access grants in MySQL...
0
8402
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8315
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8829
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8508
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5633
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4164
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1627
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.