Start a new topic

How to connect dbvisualizer personnel 8.0 using excel VBA macro

[This topic is migrated from our old forums. The original author name has been removed]

hi, For SQL server i am using below coding to connect sql using VBA Set con = New ADODB.Connection con.ConnectionString = "driver={SQL Server};" & "server=10.215.22.231\qasql1;uid=userid;pwd=passwd;database=testdata" con.Open Please anyone help me how to connect DB Visualizer using VBA???????? I wanna connection string to connect DBVisualizer automatically

[This reply is migrated from our old forums.]

Re: How to connect dbvisualizer personnel 8.0 using excel VBA macro
Hi, Assuming you mean that you want to connect to a SQL Server database from DbVisualizer, please see this part of the Users Guide: http://confluence.dbvis.com/display/UG91/Creating+a+Connection+-+basics I suggest you use the bundled jTDS driver and then just copy the server, database, userid and password info from the VBA script to the corresponding fields in the DbVisualizer connection settings. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: How to connect dbvisualizer personnel 8.0 using excel VBA macro
Thanks for your response :) I need to connect the dbvisualizer and execute the query and fetch the results through Excel Macro VBA. I wanna connection string that hit the dbvisualizer from excel.
[This reply is migrated from our old forums. The original author name has been removed]

Re: How to connect dbvisualizer personnel 8.0 using excel VBA macro
The below is the one i am using to fetch the results from sql server automatically. Sub macro() Dim con As ADODB.Connection Dim con1 As ADODB.Connection Dim rs As ADODB.Recordset Dim wb As Workbook '--------------------------------------------------------------------- 'QA Application.ScreenUpdating = False Set con = New ADODB.Connection con.ConnectionString = "driver={SQL Server};" & "server=10.215.22.931\qasql1;uid=userid;pwd=passwd;database=empdata" con.Open Set rs = New ADODB.Recordset rs.ActiveConnection = con rs.Source = "SELECT distinct tdd.userid FROM empdata(nolock)) rs.Open Sheet2.Range("A1", "E20000").CopyFromRecordset rs I need the same for automatically hit and fetch the results in dbvisualizer using excel vba --Thanks in Advance
[This reply is migrated from our old forums.]

Re: How to connect dbvisualizer personnel 8.0 using excel VBA macro
Hi, In DbVisualizer open the Tools->Connection Wizard and use it to create the database connection. Remember to chose the SQL Server (jTDS) driver. In the last wizard pane enter the database details. Please note that we have no experience with VBA. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: How to connect dbvisualizer personnel 8.0 using excel VBA macro
Thanks Rojer:) I need to automated the dbvisualizer. The way you described is mnually connection the server and execute the query. But i want like , clicking a button in excel will connect dbvisualizer and execute the query and fetch the results in the same excel. I need like a macro or tool that automatically connect the DBVisualizer --Thanks in Advance
[This reply is migrated from our old forums.]

Re: How to connect dbvisualizer personnel 8.0 using excel VBA macro
Naveen, Thanks for the additional details. I am sorry but we cannot help you with that. Regards Roger