Re: Installing Sql Server Express on Vista Home Premium



Hi

I am not able to implement your ideas till later, but I have a couple of
questions that I hope you can answer for me:

(1) Why would the same connection string work on one Vista system but not on
the two others?

(2) What would the connect string be to use the "Shared Memory" protocol?
The plan is for the database and application to remain on the one server.

Cheers

Peter

"Ekrem Önsoy" wrote:

Peter,

It seems that your SQL Server instances are Named Instances, not Default
Instances. Named Instances use Dynamic Ports instead of Static Ports.
Default Instances uses 1433 TCP port by default as a Static Port but not the
Named Instances.

If you change your Connection String as following, your application should
connect.

.ConnectionString = "Provider=SQLOLEDB.1" & ";Persist Security Info=False"
&
";User ID=peter;Password=peter;Initial Catalog=foodbank;Data Source=" &
dbname & ";Network Library=DBMSSOCN"

I simply removed the port number from the Connection String.

To find out which instance use which port, you can use SQL Server
Configuration Manager. Open this tool and then go to "SQL Server Network
Configuration" node and after expanding it, go to properties of the related
instance' s TCP/IP port. In the TCP/IP properties window, go to IP Addresses
tab, there you'll find the dynamically assigned port at the bottom.

Also, you do not have to use TCP/IP protocol if your SQL Server instance and
application instance are running on the same server and if there will not be
remotely and directly connecting users to your SQL Server instance. In this
case, "Shared Memory" protocol will do the job faster.

--
Ekrem Önsoy



"Peter" <Peter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D774A32E-441E-4AB9-832D-F1DA5D51E66F@xxxxxxxxxxxxxxxx
Hi

You are right with all of your assumptions. The connect string I use is:

dbname = "sqlserver\sqlexpress"

.ConnectionString = "Provider=SQLOLEDB.1" & ";Persist Security Info=False"
&
";User ID=peter;Password=peter;Initial Catalog=foodbank;Data Source=" &
dbname & ",1433;Network Library=DBMSSOCN"

The database that I am using is set to the default for the connecting
user.

I can connect using SSMSE

Cheers

Peter
"Ekrem Önsoy" wrote:

Hi Peter,

According to your story, I assume you have three computers with Windows
Vista installed and every computer has its own SQL Server 2008 Express
Edition installed on it and every application instance tries to connect
to
its locally installed SQL Server instance, right?

Can you tell us what connection string you use for your application to
make
connection to SQL Server? Are your SQL Server instances Default
Instances?
Also, can you connect to these instances using SSMSE?

--
Ekrem Önsoy



"Peter" <Peter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CE45E6EE-FF49-48BE-A671-D73D1D4642AD@xxxxxxxxxxxxxxxx
Hi

I have install Express on three Vista HP computers, on one everything
works
fine, but on the other two my application cannot connect to the
instance.
Any
ideas?

Studio runs and connects to the database.
Remote connections is enabled.
The Browser service is set to automatic.
IP Connections is enabled and set to listen on all ports.

Cheers

Peter


.



Relevant Pages

  • Re: Connecting to Sql Server using an IP address
    ... using IP address without port number (default port number ... of SQL Server is 1433) cannot connect to the SQL Server on a remote ... name in the connection string can connect the remote machine successfully. ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: SQL2005: Cannot connect error 11001
    ... I believe the complete Windows auth user access is too complicate, ... which trusted connection is meant? ... it would still be listening on the old port. ... Microsoft, SQL Server Books Online ...
    (microsoft.public.sqlserver.connect)
  • Re: What is the best way to connect to a server not on the network?
    ... That 192 IP address is most likely not a remote one. ... but doesn't object to migrating the data to SQL server. ... I tried using ADO within Access to create a connection string to the remote ...
    (microsoft.public.access.modulesdaovba)
  • Re: Sql Remote Connection issue
    ... port 1433 TCP Allow ... Copyright 2006 Microsoft Corporation. ... osql does not support all features of SQL Server 2005. ... Sqlcmd: Error: Microsoft SQL Native Client: An error has occurred while establishing a connection to the server. ...
    (microsoft.public.sqlserver.connect)
  • Re: SQL Server 2005 Connection Problems
    ... - it is't completely clear what the SQL Server Browser is for. ... connection reqest was being rejected. ... I think the problem is still likely the the port is blocked by some ... firewall between the server and that client. ...
    (microsoft.public.sqlserver.setup)