Does ADO work with ODBC drivers or only OLE DB providers?

只愿长相守 提交于 2019-12-31 03:54:26

问题


I am trying to create some VBA code to automate dashboard creation against a PostgreSQL database. I have heard the OLE DB driver is unreliable and it looks like it hasn't been touched in several years. Does ADO work with an ODBC driver?


回答1:


Yes, simply reference the DSN:

oConn.Open "DSN=mySystemDSN;" & _ 
           "Uid=myUsername;" & _ 
           "Pwd=myPassword"


来源:https://stackoverflow.com/questions/9187811/does-ado-work-with-odbc-drivers-or-only-ole-db-providers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!