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 ?
Vetica query execution from Excel
Moderator: NorbertKrupa
-
- Newbie
- Posts: 2
- Joined: Tue Feb 16, 2016 8:56 am
Re: Vetica query execution from Excel
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,
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,
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: Vetica query execution from Excel
Hi,
Check your driver file. Vertica 6? Yikes, that's like 2 years agoDriver={C:\Program Files (x86)\Vertica Systems\lib\vertica_6.0_odbc_3.5.dll};
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.