Using ADO in VBA to connect to PostgreSQL

前端 未结 4 1670
深忆病人
深忆病人 2021-01-24 13:10

I am having trouble finding clear and reliable examples of connecting to a PostgreSQL database from Excel using VBA ADO. Admittedly, I am new to VBA and most examples and tutori

4条回答
  •  粉色の甜心
    2021-01-24 13:32

    Not sure about the details of the actual DB connection, but there is a simple although common mistake with your statement: you need to use 'set' when working with objects:

    set cmd.ActiveConnection = cnn
    

提交回复
热议问题