For creating the connection string dynamically first you create a notepad file and save it at desktop with the extension .udl
For Example:
Right Click on desk top and New -> Text Document
Go to File-> Save As. Save this file with extension .udl
Now Just Double Click on your udl file. And select provider
Select Microsoft OLEDB Provider for SQLServer and click on Next Button;
Now in Give the server name for your machine you can give '.' or your computer name.
Submit user name & password of your database, Select the Database Name Check the connection with click on test connection and then click on ok. Now open that udl file in notepad you an find connection string in that.
No comments:
Post a Comment