Connecting to SQL Server (directly) from Compact Framework

E

Evan Camilleri

I amanged to connec to an SQL server 2005 directly from CF application using
SqlClient.

BUT I cannot access a second instance in that server. i.e. when I enter in
the connection string MYSQLSERVER, ok but MYSQLSERVER\\SQL2 then it is a
problem. The system does not connect!!!

Evan
 
G

Ginny Caughey [MVP]

Evan,

What do the two connection strings look like? Are the servers listening at
different ports?
 
E

Evan Camilleri

It is the same server with 2 different instances which do not work!
usually when there are 2 different instances the 1st instance is sql2000,
the second is sql2005.....and it works for instance 1 only.
where is is only 1 instanace it can be any...and it works.

The sa has the same password on both instances. All I did was for the first
(and it worked)
Data Source=MYSQLSERVER......etc

while in the second... (it did not work)
Data Source=MYSQLSERVER\SQL2......etc

Evan
 
C

carnivore

Evan Camilleri pisze:
It is the same server with 2 different instances which do not work!
usually when there are 2 different instances the 1st instance is sql2000,
the second is sql2005.....and it works for instance 1 only.
where is is only 1 instanace it can be any...and it works.

The sa has the same password on both instances. All I did was for the first
(and it worked)
Data Source=MYSQLSERVER......etc

while in the second... (it did not work)
Data Source=MYSQLSERVER\SQL2......etc

Instead of instance of database try use a port.

Instead of
IP\sqlexpress
try
IP,port
 
E

Evan Camilleri

you mean that different instances work on different ports?

If yes, how do i know which?

Evan
 
C

carnivore

Evan Camilleri pisze:
you mean that different instances work on different ports?

If yes, how do i know which?

Start->Programs->Microsoft Sql 20005->Configuration Tools->Sql server
configuration manager

Sql server 2005 network configuration->Protocols for ....


TCP/IP must by enabled and in properties od TCP/IP you have tab IP Addresses
IPAll -> Port
 
E

Evan Camilleri

thanks


carnivore said:
Evan Camilleri pisze:

Start->Programs->Microsoft Sql 20005->Configuration Tools->Sql server
configuration manager

Sql server 2005 network configuration->Protocols for ....


TCP/IP must by enabled and in properties od TCP/IP you have tab IP
Addresses
IPAll -> Port
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top