Groups | Blog | Home
all groups > dotnet compact framework > december 2007 >

dotnet compact framework : Connecting to SQL Server (directly) from Compact Framework



Ginny Caughey [MVP]
12/19/2007 3:20:46 PM
Evan,

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

--
Ginny Caughey
Device Application Development MVP


[quoted text, click to view]
Evan Camilleri
12/19/2007 6:19:35 PM
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

Evan Camilleri
12/20/2007 10:55:01 AM
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


[quoted text, click to view]

carnivore
12/20/2007 11:17:15 AM
Evan Camilleri pisze:
[quoted text, click to view]

Instead of instance of database try use a port.

Instead of
IP\sqlexpress
try
Evan Camilleri
12/20/2007 11:49:59 AM
you mean that different instances work on different ports?

If yes, how do i know which?

Evan


[quoted text, click to view]

carnivore
12/20/2007 12:19:21 PM
Evan Camilleri pisze:
[quoted text, click to view]

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
Evan Camilleri
12/20/2007 9:06:10 PM
thanks


[quoted text, click to view]

AddThis Social Bookmark Button