Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 6th, 2006, 12:47 PM
Registered User
 
Join Date: Oct 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access database/SQL Server backend Question

I am developing an Access database that will be migrated to a SQL Server sometime in the next few months. There are 8 tables in this database and at any given time, there will likely be less than 10 users/applications accessing the data at any given time.

I am working on the code to process data on the main form. I am wondering if I should be worried about using ADO instead of DAO. Although I've read that ADO is the better way to go, I've also heard that it doesn't necessarily speed things up.

I have an Associate's degree in programming and learned vb6 when I was in school. This is the third database I've developed and the most complex. I'm looking to buy a book this weekend to help me with the programming and am trying to figure out what type of book to get. DAO looks a little bit easier to me as I am pretty much a newbie, but if it has significant shortcomings I don't want to go that route.

Thanks for your help.
vbJupiter

 
Old October 6th, 2006, 07:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Yup, DAO has significant shortcomings in a client/sever environment. DAO is simply the application programming interface (API) for the Jet database engine and works perfectly well with Jet database objects. Any bound form you create in an Access app (.mdb) is using DAO to talk to the Jet engine. But DAO can't work with SQL Server objects directly. In order to use DAO and SQL Server together, you would need to use things like pass-through queries that execute Transact SQL commands on ODBC connections to fetch data into local Jet tables. An interesting exercise, but not your optimal option.

Definitely use ADO. ADO was designed to work with data sources other than the Jet database engine (like SQL Server). With ADO you can manipulate SQL Server database objects directly through the Microsoft OLE DB Provider for SQL Server (you indicate the Provider in your connectioin string). Generally, in the type of 2-tier app you're describing, you'll use ADO Command objects a lot to execute stored procedures on the server.

A quick and dirty option is simple linking. You can link bound Access forms directly to SQL Server, and the Jet engine and ODBC handle all the communication details for you. Linking devours a lot of network and server resources, however. The best approach is always to use unbound forms populated from ADO recorsets. Or, use an Access Data Project (.adp) which all use ADO connections anyway.

HTH,

Bob








Similar Threads
Thread Thread Starter Forum Replies Last Post
Locking in Access DB linked to SQL Server backend gibbers Access 3 April 24th, 2007 03:20 PM
Access Reports from SQL backend feets Access VBA 1 January 5th, 2007 08:36 AM
ms access form as criteria on sql server backend ottos13 Access 1 September 13th, 2006 12:14 PM
Access MDB with SQL Backend ashg657 Access 2 July 18th, 2006 12:54 PM
exporting access database to sql server Sheena SQL Server 2000 2 December 29th, 2004 04:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.