to SSW and include the following text:
- A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and
that SQL Server is configured to allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a
connection to SQL Server)
SQL Server Stored Procedure Formatting Standard
This standard outlines the standard on formatting Stored Procedures
within SQL Server. Use these standards when creating new Stored
Procedures or if you find an older Stored Procedure that doesn't
follow these standards within SSW.
Note: Some developers may question the convention for naming stored
proc parameters. We agree that this one is certainly open to debate.
You need to ask yourself, "how will using this convention help my
programmers?" and be prepared to drop the convention if the answer is
"well actually it probably won't".
We have always found control naming conventions useful on Access, VB
and ASP forms. Therefore we bring them through to SQL Server - you may
not. For example there is some question on the usefulness on using a
str prefix on string variable types for Char, nChar, Varchar,
nVarchar, Text, nText - in this case you really need to know more
information than that (ie. the length), however you can at least tell
whether you need single quotes in a WHERE clause (ie. WHERE ClientID='
@strClientID '). Overall we believe this convention saves time because
the datatypes are intuitive by their name.
Each parameter is to go on a new line.
A prefix of 'p' if the variable is passed in as a parameter i.e.
@plngClientID
A three-letter string that indicates the type of variable being used
Parameter Type String Example
Each field in a SELECT/UPDATE statement is to go on a new line
Each item is to be indented. (See below)
Place each condition of a WHERE clause on a new line.
Example
UPDATE ClientContact SET DateBouncedLast = getdate(), BouncedTimes
= 1, BouncedEmail = @pstrBouncedEmail FROM ClientContact WHERE
Email = @pstrBouncedEmail AND ContactID = @pintContactID
RETURN
Figure: Example of bad format