It’s a bit hard developing in different languages using different databases. And most of the times, I forget the connection string that I should use.

The following three connection strings would probably be the strings that I’d use often:


Oracle
Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;

SQL Server 2005 (Standard Security for .NET)
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

SQL Server 2000 (Standard Security for .NET)
Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;

Another syntax is this:
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

If you’re looking for other connection strings, visit ConnectionStrings.com. They have connection strings not only for databases but also for other files such as Excel and Active Directory.



No Responses to “Connection Strings”  

  1. No Comments

Leave a Reply