Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to connect MS SQL Server using VBA Macro Programming?
Hi,
Can you pls send me the connection string of connecting MS SQL Server using VBA Programming... Reply me asap.. Regards Raj |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to connect MS SQL Server using VBA Macro Programming?
Hi Raj,
The exact details will depend on the server name, user name and password etc. Here is a way to get most of the information you need. Open Windows Explorer and in some directory right click and choose NewText Document. Then change the file extension of that document from .txt to .udl This changes the file type to a data link file. Double click the file and the Data Link properties dialogue will appear. Select the required Provider on the first tab and click Next. Fill in the required information on the Connection tab (Server, User Name etc). Test the connection to make sure you have the details correct. Once you have then click OK. The above step requires the oledb32.dll (or similar) to be on your system, and it should be by default. Now right click the file and select Open With and choose Notepad. Now you will see the udl file in notepad, and that will have your specific connection string. Once you have the basics of this in your code you can play around with it so that you can ask the user for their User Name and Password etc. Hope this helps, Sean. -- (please remember to click yes if replies you receive are helpful to you) "Raju A" wrote: Hi, Can you pls send me the connection string of connecting MS SQL Server using VBA Programming... Reply me asap.. Regards Raj |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to connect MS SQL Server using VBA Macro Programming?
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Connect to OPC / DDE server | Excel Worksheet Functions | |||
How can I use VBA to connect to a SQL server? | Excel Programming | |||
what if the configured proxy server does not connect | Excel Programming | |||
connect to an oracle server | Excel Programming |