Page 1 of 1

How to obtain connection from VBA to execute insert query

Posted: Mon 20 Jun 2016 13:44
by dbrioso
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

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

Posted: Wed 22 Jun 2016 10:08
by Pinturiccio
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.

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

Posted: Wed 22 Jun 2016 11:09
by dbrioso
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,

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

Posted: Tue 04 Jul 2017 16:44
by JB.BOUCHER
Hi team,

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

JB

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

Posted: Wed 05 Jul 2017 12:07
by Pinturiccio
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.