Winnersh Triangle Web Solutions Limited

Timesaving tools for software developers

HOME | NEWS | PRODUCTS | DOWNLOADS | SPECIAL OFFERS | ORDERING | UPGRADES | CONTACT 
 
SEARCH WEBSITE
Search Website

PRODUCTS
The Website Utility
.NET Documentation Tool
ASP Documentation Tool
ASP.NET Documentation Tool
VB 6.0 Documentation Tool
PHP Documentation Tool
SQL Documentation Tool
JavaScript Banner Ad Rotator
Indexing Service Companion
Product Ordering
Special Offers

SERVICES
Articles & Whitepapers
Documentation Portal
Client Success Stories
Sell Our Products
Our Blog

Recommended Connection Strings


These Microsoft SQL Server and Microsoft Access database connection string examples can be used with our following products that have database connectivity options:

Note that the SQL Documentation Tool SQL Server database documentor product contains its own connection string builder.

Troubleshooting Connection Strings

All of our code documentation tools require that the SQL Server user account specified in the connection string has execute permissions in the system database's stored procedures (e.g. sp_tables). To check that the account can access these:

  • Log into the Query Analyser using the username and password you have specified in the connection string.
  • Execute the SQL statement: databasename..sp_tables [where databasename is the name of your database you wish to document].
  • If the username has the correct permissions you will see a results set returned listing the database tables in that database.

Another common problem that users encounter is problems with their database names. Our products may work correctly with databases containing certain characters such as hypens or underscores in their names. Such database names aren't supported with transact SQL, but unfortunately the SQL Server Enterprise Manager does not check for these characters when databases are named.

Microsoft SQL Server Connection Strings

SQL Server, using a specific SQL login:
Provider=SQLOLEDB.1;Persist Security Info=True;Initial Catalog=SampleWeb;Data Source=127.0.0.1;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=BRETTB;User Id=webuser;PASSWORD=Htf674HHs

SQL Server 2000, using a trusted connection:
Driver={SQL Server};Server=mydatabaseserver;Database=Northwind;Trusted_Connection=Yes;

SQL Server 2005:
Driver={SQL Native Client};Trusted_Connection=yes;Server=mymachinename;

SQL Server 2005 Express Edition (specific instance of server):
Driver={SQL Server};Server=MyMachineName\SQLExpress;Database=MyDatabaseName;Trusted_Connection=Yes;

SQL Server 2005 Express Edition (assuming Pubs database is to be documented. Remove line breaks before use):
Driver={SQL Native Client};
Server=.\SQLExpress;AttachDbFilename=C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Pubs.mdf;
Database=Pubs;Trusted_Connection=Yes;

SQL Server, using a previously configured ODBC data source:
DSN=Northwind;UID=webuser;PWD=Htf674HHs;

Microsoft Access Connection Strings

Again, Microsoft Access databases can be accessed using a previously configured ODBC connection. Alternatively they may be accessed using an OLEDB connection string:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\database\SampleProject.mdb



 


© Copyright 2002 - 2008 Winnersh Triangle Web Solutions Limited. Registered company number: 4493816.       Sales Policy | Site Map  
C# code documentor VB.NET C# code comments documenting SQL Server