If you need to create a database before being able to connect to the other
one, I'm not sure if your setup is really OK. What's the exact name of the
server are you using (example: « . », « .\SQLExpress2005 », « (local) »,
« (local)\SQLExpress2005 », « localhost », « localhost\SQLExpress2005 »,
etc.) ?
If I were you, I would go for TCP/IP and I would make sure to use TCP/IP and
not the named pipes protocol or the multiprotocol, even on the local
machine. Using a TCP/IP address for the server, creating an alias (under
the
tab SQL Native Client Configuration / Alias in the SQL Server Configuration
Manager program) or adding the prefix tcp: are all good ways of making sure
that you are using tcp/ip and not the named pipes protocol (np: ). Adding
the port number (usually 1433 if you have a single instance but not
necessarily 1433 if you have multiple instances) might be also a good idea.
When configuring the server with the SQL Server Configuration Manager, don't
confuse the Server Network Configuration Protocols with the Client
Configuration Protocols. I'm not sure but I would think that the SQL Server
Browser that you will find in the SQL Server 2005 Surface Area Configuration
utility must also be activated and started if you don't want to have
problem; especially if you have multiple instances and don't want to mention
the port to be used.
If the server is a remote server (ie, it's not the local machine), then the
TCP/IP protocol must be enabled in the Remote Connection tab for the
Database Engine in the SQL Server 2005 Surface Area Configuration utility.
If you have a problem and don't know why then check the Name Pipes protocol,
too.
Here are some good articles on resolving connection problem with SQL2500
Express:
http://www.datamasker.com/SSE2005_NetworkCfg.htm
http://blogs.msdn.com/sql_protocols...e-the-target-machine-actively-refused-it.aspx
http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
http://blogs.msdn.com/sqlexpress/archive/2004/07/23/192044.aspx
http://msdn2.microsoft.com/en-us/library/ms345318.aspx
http://www.connectionstrings.com/?carrier=sqlserver (connection strings for
sql providers)
http://www.carlprothman.net/Default.aspx?tabid=81 (idem)