ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ADO connection Steps (https://www.excelbanter.com/excel-programming/381621-re-ado-connection-steps.html)

NickHK

ADO connection Steps
 
Harish,
One way to generate connection strings is:
- Create a new text file somewhere suitable called "ConnTesrt.udl"
- Double click it.
- Make the required setting on the tabs, test the connection. OK.
-Open the file in a text editor to see the Connection string.

NickHK

"Harish" wrote in message
...
Hi all

I retrieve the data from database using folllwing Code and which works

fine.

With Selection.QueryTable
.Connection = "ODBC;DSN=XYZ;UID=abc;PWD=abc;SERVER=PQRS;"
.Refresh BackgroundQuery:=False
End With

But Now I want to use ADO retrieval method for data extraction. I am new

to
ADO technique, so if someone could help me to generate the connection

string
to my database through ADO would be great.

Your help would be greatly appreciated.

Kind Regards
Harish






All times are GMT +1. The time now is 01:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com