Vetica query execution from Excel

Moderator: NorbertKrupa

Post Reply
pratik4891
Newbie
Newbie
Posts: 2
Joined: Tue Feb 16, 2016 8:56 am

Vetica query execution from Excel

Post by pratik4891 » Tue Feb 16, 2016 10:13 am

Hello ,

I have fond a very useful article about how to connect to vertica from excel.

My requirement is to execute sql query which stored in excel cell value in vetica DB
Any idea on how to do that ?

pratik4891
Newbie
Newbie
Posts: 2
Joined: Tue Feb 16, 2016 8:56 am

Re: Vetica query execution from Excel

Post by pratik4891 » Tue Feb 16, 2016 2:40 pm

Hi,

I have tried to execute the below command from macro
Code:
Sub abc()
Dim conn As New ADODB.Connection
Dim rs As ADODB.Recordset
Dim query As String
Set con = New ADODB.Connection
Set rs = New ADODB.Recordset
strcon = "Driver={C:\Program Files (x86)\Vertica Systems\lib\vertica_6.0_odbc_3.5.dll}; " & _
"CONNECTSTRING=(DESCRIPTION=Dev" & _
"(ADDRESS=(PROTOCOL=TCP)" & _
"(HOST=XXXX)(PORT=XXXX))" & _
"(CONNECT_DATA=(SID=XX.XX.XX.XX))); uid=XXX@XX.com; pwd=XXXX;"
con.Open (strcon)
End Sub
I am getting the error "Data source name not found and default driver specified"
Please let me know how can I resolve this ?

Thanks,

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1778
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: Vetica query execution from Excel

Post by JimKnicely » Wed Feb 17, 2016 4:18 pm

Hi,
Driver={C:\Program Files (x86)\Vertica Systems\lib\vertica_6.0_odbc_3.5.dll};
Check your driver file. Vertica 6? Yikes, that's like 2 years ago :(
Jim Knicely

Image

Note: I work for HPE. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “ODBC”