DAO ADO Access vs Excel 
Author Message
 DAO ADO Access vs Excel

I am certain this question has been answered a million times, but like
everything else on the internet, it is quite time consuming to find.  Based
on the little I have read, I get the impression that DAO or ADO is a form of
visual basic.  I was curious if the VBA that is attached to Excel is
compatible with it (and how would I know if my version is compatible)?  I
tried a command that the VBA help file in Excel said was for DAO, and I get
errors.

I was also curious what command line format can be used to execute an excel
subprocedure from a batch file?  I can get the batch file to load the excel
spreadsheet, but I haven't figured out how to get it to execute a specific
sub procedure?  The /x works for Access Macro, but not Excel Module.

Thank you,
Chris



Sat, 04 Jun 2005 08:52:39 GMT  
 DAO ADO Access vs Excel
Hi Chris,

DAO and ADO are COM objects which provide access to ODBC databases like
SQLServer and Access.  They are not part of VB or VBA but can easily be
accessed from VB or VBA.  To use DAO and ADO you need to add a reference in
Tools / References to the appropriate library (they will almost certainly be
in the list of available references).  The first step in using the objects
however is to connect to a database, and the appropriate syntax for doing
this depends upon the database type and the way it is set up.

If you execute Excel c:\MyDirectory\MyFile.xls from the command line, XL
will start and load the specified file.  If the XL workbook contains code in
the Workbook_Open event or a routine in a module called Auto_Open, the code
therein will be executed.

HTH

Peter Beach


Quote:
> I am certain this question has been answered a million times, but like
> everything else on the internet, it is quite time consuming to find.
Based
> on the little I have read, I get the impression that DAO or ADO is a form
of
> visual basic.  I was curious if the VBA that is attached to Excel is
> compatible with it (and how would I know if my version is compatible)?  I
> tried a command that the VBA help file in Excel said was for DAO, and I
get
> errors.

> I was also curious what command line format can be used to execute an
excel
> subprocedure from a batch file?  I can get the batch file to load the
excel
> spreadsheet, but I haven't figured out how to get it to execute a specific
> sub procedure?  The /x works for Access Macro, but not Excel Module.

> Thank you,
> Chris



Sat, 04 Jun 2005 11:26:31 GMT  
 DAO ADO Access vs Excel
Here is a reference to some sample code:

http://www.erlandsendata.no/english/vba/adodao/index.htm

http://support.microsoft.com/?kbid=257819
HOWTO: Use ADO and ADOX with Excel Data from Visual Basic

http://support.microsoft.com/default.aspx?scid=/support/excel/dao.asp

http://msdn.microsoft.com/library/en-us/wp/htm/dasdktechartoverview.asp
Microsoft Data Access Technical Articles Overview

Regards,
Tom Ogilvy


Quote:
> Hi Chris,

> DAO and ADO are COM objects which provide access to ODBC databases like
> SQLServer and Access.  They are not part of VB or VBA but can easily be
> accessed from VB or VBA.  To use DAO and ADO you need to add a reference
in
> Tools / References to the appropriate library (they will almost certainly
be
> in the list of available references).  The first step in using the objects
> however is to connect to a database, and the appropriate syntax for doing
> this depends upon the database type and the way it is set up.

> If you execute Excel c:\MyDirectory\MyFile.xls from the command line, XL
> will start and load the specified file.  If the XL workbook contains code
in
> the Workbook_Open event or a routine in a module called Auto_Open, the
code
> therein will be executed.

> HTH

> Peter Beach



> > I am certain this question has been answered a million times, but like
> > everything else on the internet, it is quite time consuming to find.
> Based
> > on the little I have read, I get the impression that DAO or ADO is a
form
> of
> > visual basic.  I was curious if the VBA that is attached to Excel is
> > compatible with it (and how would I know if my version is compatible)?
I
> > tried a command that the VBA help file in Excel said was for DAO, and I
> get
> > errors.

> > I was also curious what command line format can be used to execute an
> excel
> > subprocedure from a batch file?  I can get the batch file to load the
> excel
> > spreadsheet, but I haven't figured out how to get it to execute a
specific
> > sub procedure?  The /x works for Access Macro, but not Excel Module.

> > Thank you,
> > Chris



Sat, 04 Jun 2005 11:58:38 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ADO Recordsets and Forms (ADO vs DAO)

2. Using ADO Recordset with Forms (ADO vs DAO)

3. ADO vs DAO vs ADODB

4. ADO Vs. DAO and Access 2002

5. Access ADO vs. DAO

6. ADO vs DAO for Access Queries via ASP

7. ADO vs DAO for Access Queries via ASP

8. DAO 3.5 vs 3.6 (Access 97 vs Access 2000)

9. Exporting Excel Data to Access using DAO/ADO/VBA

10. ADO vs DAO


 
Powered by phpBB® Forum Software © phpBB Group