VBA Excel To SqlServer
Posted
by adrianm
on Stack Overflow
See other posts from Stack Overflow
or by adrianm
Published on 2010-04-14T09:28:13Z
Indexed on
2010/04/14
9:33 UTC
Read the original article
Hit count: 339
excel-vba
|sql-server-2005
What is the best way to write VBA code to connect to SQL Server 2005 from Excel?
The users of the excel file might run XP, Vista, Win7 and I want to prevent driver installation as much as possible.
My understanding is that XP uses MDAC while Vista/Win7 uses DAC. Does that mean that a reference to MDAC 2.8 will not work on a Vista machine and the other way around?
Will my VBA code work on both if I don't add a reference and use late binding, e.g. CreateObject("ADODB.Connection")?
© Stack Overflow or respective owner