How to obtain connection from VBA to execute insert query

Discussion of issues, suggestions and bugs of Devart Excel Add-ins, our product line for connecting Excel to external data from cloud applications and databases
Post Reply
dbrioso
Posts: 2
Joined: Mon 20 Jun 2016 13:38

How to obtain connection from VBA to execute insert query

Post by dbrioso » Mon 20 Jun 2016 13:44

Hello,

I am new to this forum; I am test-driving the Excel add-in for PostgreSQL but cannot figure out how to obtain the connection from my VBA scripts to perform an insert/update operation on Excel 2016.

The connection to the database is set up and works fine (the sheets are loaded with the data from the corresponding tables). I have a dialog that pops up when I select a row to perform different operations on the database (inserts, updates, depending on context).

I know how to set up a connection using an ADODB object, but I have not been able to find any code samples that point my in the right direction to using the Devart add-in.

I do not know if I need to enable any project references, etc.

My connection is called PostgreSQLConnectionQA, I have tried setting it as Provider, but nothing:

Set cnn = CreateObject("ADODB.Connection")
cnn.Provider = "PostgreSQLConnectionQA"
' cnn.ConnectionString = "DSN=PostgreSQLConnectionQA;"

Thank you in advance for your help.

Best regards

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: How to obtain connection from VBA to execute insert query

Post by Pinturiccio » Wed 22 Jun 2016 10:08

At the moment Excel Add-ins does not support interaction with VBA. We will investigate the possibility to support using VBA and notify you about the results as soon as possible.

dbrioso
Posts: 2
Joined: Mon 20 Jun 2016 13:38

Re: How to obtain connection from VBA to execute insert query

Post by dbrioso » Wed 22 Jun 2016 11:09

Hello,

Thank you for the information, this was driving me crazy, not being able to obtain the connection information.

Please let me know about this feature as soon as you have any news, because it is a show-stopper for us not to have it.

Best regards,

JB.BOUCHER
Posts: 2
Joined: Tue 04 Jul 2017 16:23

Re: How to obtain connection from VBA to execute insert query

Post by JB.BOUCHER » Tue 04 Jul 2017 16:44

Hi team,

Do you also have any update on this feature?
Like taking values from a cell, it would be very useful.

JB

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: How to obtain connection from VBA to execute insert query

Post by Pinturiccio » Wed 05 Jul 2017 12:07

Unfortunately, the situation didn’t change. The described feature is not supported yet, and we can't tell any timeframe when this feature will be supported.

Post Reply