[AccessD] Using ADO to change a TableDef? Mixing ADO and DAO?

Charlotte Foust charlotte.foust at gmail.com
Fri Apr 22 17:48:27 CDT 2011


You can use both, if you declare them specifically, but don't try to
mix them because ADO calls don't work on a DAO object!

Charlotte Foust

On Fri, Apr 22, 2011 at 12:00 PM, Rocky Smolin <rockysmolin at bchacc.com> wrote:
> IIRC if you define all the DOA and ADO objects explicitly they'll play well
> together.
>
> Rocky
>
>
> -----Original Message-----
> From: accOessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks
> Sent: Friday, April 22, 2011 9:50 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Using ADO to change a TableDef? Mixing ADO and DAO?
>
> All - Thanks for the help/advice/insights ... Brad
>
> ~~~~~~~~~~~
>
> Rocky,
>
> In the situation that I am dealing with, the Excel file is a "Linked Table".
>
> This works fine.
>
> Now we want to be able to change the Path to this Linked Table with VBA
> code.
>
> I have this working using DAO, but I have some concern about using both DAO
> and ADO in the same application.
>
> It appears that using both DAO and ADO is Okay, but I am not 100% sure.
>
> Thanks,
> Brad
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
> Sent: Friday, April 22, 2011 8:45 AM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Using ADO to change a TableDef? Mixing ADO and DAO?
>
> What kind of change do you want to make?  Wouldn't the path to the Excel
> file be stored as data in a text field in the table?
>
> Rocky
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks
> Sent: Friday, April 22, 2011 6:31 AM
> To: Access Developers discussion and problem solving
> Subject: [AccessD] Using ADO to change a TableDef? Mixing ADO and DAO?
>
> All,
>
> We have an existing Access 2007 application that uses ADO.
>
> We now want to enhance this application to be able to change a TableDef with
> VBA code so that we can change the path to an Excel file on the fly.
>
> Is it possible to change TableDefs with ADO?
>
> I have seen many examples of how to change TableDefs with DAO, but I have
> not yet discovered an example of how to do this with ADO.
>
> I am fairly new to the world of Access and I am still trying to wrap my
> little brain around the "ADO vs DAO" debate.
>
> Is it Okay to mix both ADO and DAO in a single Access 2007 application?
>
> Thanks,
> Brad
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> This message has been scanned for viruses and dangerous content by
> MailScanner, and is believed to be clean.
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>




More information about the AccessD mailing list