Tuesday, July 3, 2007

Connection String......

Did u ever had a tough time writing a connection string to a Database...

Here is the easiest method of all...

Its Soo simple and easy and u can just have ur Connection string just using only a notepad.


All u gotta do is to Create a New Notepad Docuement and save it as FileName.UDL file

Now double click on the same file and use the wizard to configure ur connection with the DataBase..

Now once all the confoigurations are done, Close the file and reopen it using Note pad or any text editor...

There u go, Ur Connection String is ready.

Ur String may looks like this

.
.
.
[oledb]; Everything after this line is an OLE DB initstringProvider=SQLOLEDB.1;Persist Security Info=False;User ID=dbuser;Initial Catalog=INDUB;Data Source=NESSQLSRV
.
.
.

Now u knw how easy it is to write connection strings without a need to remember many things.....

Happy Coding...

0 comments: