Setting up an outside SQLConnection with PPC2k3 & ActiveSync 3.7

G

Guest

I am unable to establish an SQL connection to an outside SQL Server 2k from my PPC2k3/ActiveSync 3.7 PDA. Since I am needing to pass the User ID and Password, I cannot set the Integrated Security argument to true or SSPI. If I set Integrated Security to false, the System.PlatformNotSupportedException gets thrown. Below is what I have in my ConnectionString:

"Integrated Security=false;Persist Security Info=false;Password=somepass;User ID=someuser;Database=TestDB;Server=206.43.54.34"

I have used a very similar ConnectionString with a PPC2k2 application and never had a problem when opening a connection to an outside server. Is there some setting I missed in PPC2k3/ActiveSync 3.7 or workaround available? Thank you in advance.
 
B

Brad Syputa - MS

If you leave out the Integrated Security token in your connect string, what
happens? Setting it to false is not necessary if you are using User ID and
Password.



--------------------
| Thread-Topic: Setting up an outside SQLConnection with PPC2k3 &
ActiveSync 3.7
| thread-index: AcPlaE9J0s7z+SLWRUq4eDTsk0G4ug==
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
| From: =?Utf-8?B?UmljaHRlciBCZWxtb250?=
<[email protected]>
| Subject: Setting up an outside SQLConnection with PPC2k3 & ActiveSync 3.7
| Date: Tue, 27 Jan 2004 22:31:06 -0800
| Lines: 5
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:44200
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| I am unable to establish an SQL connection to an outside SQL Server 2k
from my PPC2k3/ActiveSync 3.7 PDA. Since I am needing to pass the User ID
and Password, I cannot set the Integrated Security argument to true or
SSPI. If I set Integrated Security to false, the
System.PlatformNotSupportedException gets thrown. Below is what I have in
my ConnectionString:

"Integrated Security=false;Persist Security
Info=false;Password=somepass;User
ID=someuser;Database=TestDB;Server=206.43.54.34"

I have used a very similar ConnectionString with a PPC2k2 application and
never had a problem when opening a connection to an outside server. Is
there some setting I missed in PPC2k3/ActiveSync 3.7 or workaround
available? Thank you in advance.
|
 
G

Guest

Brad:

System.PlatformNotSupportedException is thrown when I leave out the Integrated Security token or set it to false.

I came along some SQL Server CE 2 documentation (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqlce/htm/_lce_sqlclient_705.asp) that states if I want to use SQLClient in .NETCF, I have to set Integrated Security to SSPI and set the User ID and Password. When i attempted to try that I receive a "Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection." error. What is the correct ConnectionString for accessing an external SQL server or what settings am I missing? Thank you in advance.

----- \"Brad Syputa - MS\" wrote: -----

If you leave out the Integrated Security token in your connect string, what
happens? Setting it to false is not necessary if you are using User ID and
Password.



--------------------
| Thread-Topic: Setting up an outside SQLConnection with PPC2k3 &
ActiveSync 3.7
| thread-index: AcPlaE9J0s7z+SLWRUq4eDTsk0G4ug==
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
| From: =?Utf-8?B?UmljaHRlciBCZWxtb250?=
<[email protected]>
| Subject: Setting up an outside SQLConnection with PPC2k3 & ActiveSync 3.7
| Date: Tue, 27 Jan 2004 22:31:06 -0800
| Lines: 5
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:44200
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| I am unable to establish an SQL connection to an outside SQL Server 2k
from my PPC2k3/ActiveSync 3.7 PDA. Since I am needing to pass the User ID
and Password, I cannot set the Integrated Security argument to true or
SSPI. If I set Integrated Security to false, the
System.PlatformNotSupportedException gets thrown. Below is what I have in
my ConnectionString:

"Integrated Security=false;Persist Security
Info=false;Password=somepass;User
ID=someuser;Database=TestDB;Server=206.43.54.34"

I have used a very similar ConnectionString with a PPC2k2 application and
never had a problem when opening a connection to an outside server. Is
there some setting I missed in PPC2k3/ActiveSync 3.7 or workaround
available? Thank you in advance.
|
 
B

Brad Syputa - MS

I use 2 different connection strings when I connect. In the SQLCE Books on
Line, there is some details about SqlClient.

Integrated security, using a login from the domain.
1. data source=Server;Initial Catalog=database;Integrated Security = SSPI;
User ID = Domain\Me; Password = MyPassword;

Sql Authentication.
1. data source=Server;Initial Catalog=database; User ID = SqlLogin;
Password = SqlPassword;

I do not know whey you get the exception. Wrap the call to SqlClient in a
try\catch block and it should produce a better error. If you already have a
try\catch block, I am not sure what the problem is.

I also read that a connection is not allowed through Active Sync, but only
a true TCP\IP connection. From the Books On Line:

Net-Library selection
Only TCP/IP connections to an instance of SQL Server are supported.
System.Data.SqlClient cannot connect to SQL Server through a device cradle.



--------------------
| Thread-Topic: Setting up an outside SQLConnection with PPC2k3 &
ActiveSync 3.7
| thread-index: AcPl/ctaVlX9N8AJR+ukTYmgmf452A==
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
| From: =?Utf-8?B?UmljaHRlciBCZWxtb250?=
<[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: Setting up an outside SQLConnection with PPC2k3 & ActiveSync
3.7
| Date: Wed, 28 Jan 2004 16:21:09 -0800
| Lines: 59
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:44310
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Brad:

System.PlatformNotSupportedException is thrown when I leave out the
Integrated Security token or set it to false.

I came along some SQL Server CE 2 documentation
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqlce/htm/
_lce_sqlclient_705.asp) that states if I want to use SQLClient in .NETCF, I
have to set Integrated Security to SSPI and set the User ID and Password.
When i attempted to try that I receive a "Login failed for user '(null)'.
Reason: Not associated with a trusted SQL Server connection." error. What
is the correct ConnectionString for accessing an external SQL server or
what settings am I missing? Thank you in advance.

----- \"Brad Syputa - MS\" wrote: -----

If you leave out the Integrated Security token in your connect string,
what
happens? Setting it to false is not necessary if you are using User ID
and
Password.



--------------------
| Thread-Topic: Setting up an outside SQLConnection with PPC2k3 &
ActiveSync 3.7
| thread-index: AcPlaE9J0s7z+SLWRUq4eDTsk0G4ug==
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
| From: =?Utf-8?B?UmljaHRlciBCZWxtb250?=
<[email protected]>
| Subject: Setting up an outside SQLConnection with PPC2k3 &
ActiveSync 3.7
| Date: Tue, 27 Jan 2004 22:31:06 -0800
| Lines: 5
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:44200
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| I am unable to establish an SQL connection to an outside SQL Server
2k
from my PPC2k3/ActiveSync 3.7 PDA. Since I am needing to pass the
User ID
and Password, I cannot set the Integrated Security argument to true or
SSPI. If I set Integrated Security to false, the
System.PlatformNotSupportedException gets thrown. Below is what I
have in
my ConnectionString:

"Integrated Security=false;Persist Security
Info=false;Password=somepass;User
ID=someuser;Database=TestDB;Server=206.43.54.34"

I have used a very similar ConnectionString with a PPC2k2 application
and
never had a problem when opening a connection to an outside server.
Is
there some setting I missed in PPC2k3/ActiveSync 3.7 or workaround
available? Thank you in advance.
|


|
 
B

Brad Syputa - MS

I asked around and could not come up with any good solutions for you. I was
told it should work, but no one has a good reason why it should or should
not work. I will keep digging into it to find out more information.

Try using the sqlserver machine name instead of the IP address.

If anyone else has suggestions, please step forward.

--------------------
| Thread-Topic: Setting up an outside SQLConnection with PPC2k3 &
ActiveSync 3.7
| thread-index: AcPmncLG2IVtYm5QSuSBKq/56lWWYw==
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
| From: =?Utf-8?B?UmljaHRlciBCZWxtb250?=
<[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| Subject: RE: Setting up an outside SQLConnection with PPC2k3 & ActiveSync
3.7
| Date: Thu, 29 Jan 2004 11:26:14 -0800
| Lines: 136
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:44390
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| The call to SQLClient is already wrapped in a try/catch block and the
exception message that was produced was already mentioned in the previous
reply. In my case, the connection to the SQL server will only be made
through the device cradle.
My previous application made for PPC2002 had no problems connecting to the
same SQL server using SQL authentication through the device cradle. I have
set up the connection methods for the current application like the previous
application, yet this error appears. Is there any way around this?

----- \"Brad Syputa - MS\" wrote: -----

I use 2 different connection strings when I connect. In the SQLCE
Books on
Line, there is some details about SqlClient.

Integrated security, using a login from the domain.
1. data source=Server;Initial Catalog=database;Integrated Security =
SSPI;
User ID = Domain\Me; Password = MyPassword;

Sql Authentication.
1. data source=Server;Initial Catalog=database; User ID = SqlLogin;
Password = SqlPassword;

I do not know whey you get the exception. Wrap the call to SqlClient
in a
try\catch block and it should produce a better error. If you already
have a
try\catch block, I am not sure what the problem is.

I also read that a connection is not allowed through Active Sync, but
only
a true TCP\IP connection. From the Books On Line:

Net-Library selection
Only TCP/IP connections to an instance of SQL Server are supported.
System.Data.SqlClient cannot connect to SQL Server through a device
cradle.



--------------------
| Thread-Topic: Setting up an outside SQLConnection with PPC2k3 &
ActiveSync 3.7
| thread-index: AcPl/ctaVlX9N8AJR+ukTYmgmf452A==
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
| From: =?Utf-8?B?UmljaHRlciBCZWxtb250?=
<[email protected]>
| References:
<[email protected]><4J7r9Cf5DHA.3736@cpmsft
ngxa07.phx.gbl>
| Subject: RE: Setting up an outside SQLConnection with PPC2k3 &
ActiveSync
3.7
| Date: Wed, 28 Jan 2004 16:21:09 -0800
| Lines: 59
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:44310
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Brad:

System.PlatformNotSupportedException is thrown when I leave out the
Integrated Security token or set it to false.

I came along some SQL Server CE 2 documentation

(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqlce/htm/
_lce_sqlclient_705.asp) that states if I want to use SQLClient in
.NETCF, I
have to set Integrated Security to SSPI and set the User ID and
Password.
When i attempted to try that I receive a "Login failed for user
'(null)'.
Reason: Not associated with a trusted SQL Server connection." error.
What
is the correct ConnectionString for accessing an external SQL server
or
what settings am I missing? Thank you in advance.

----- \"Brad Syputa - MS\" wrote: -----

If you leave out the Integrated Security token in your connect
string,
what
happens? Setting it to false is not necessary if you are using
User ID
and
Password.



--------------------
| Thread-Topic: Setting up an outside SQLConnection with PPC2k3 &
ActiveSync 3.7
| thread-index: AcPlaE9J0s7z+SLWRUq4eDTsk0G4ug==
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
| From: =?Utf-8?B?UmljaHRlciBCZWxtb250?=
<[email protected]>
| Subject: Setting up an outside SQLConnection with PPC2k3 &
ActiveSync 3.7
| Date: Tue, 27 Jan 2004 22:31:06 -0800
| Lines: 5
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:44200
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| I am unable to establish an SQL connection to an outside SQL
Server
2k
from my PPC2k3/ActiveSync 3.7 PDA. Since I am needing to pass
the
User ID
and Password, I cannot set the Integrated Security argument to
true or
SSPI. If I set Integrated Security to false, the
System.PlatformNotSupportedException gets thrown. Below is what
I
have in
my ConnectionString:

"Integrated Security=false;Persist Security
Info=false;Password=somepass;User
ID=someuser;Database=TestDB;Server=206.43.54.34"

I have used a very similar ConnectionString with a PPC2k2
application
and
never had a problem when opening a connection to an outside
server.
Is
there some setting I missed in PPC2k3/ActiveSync 3.7 or
workaround
available? Thank you in advance.
|


|


|
 
G

Guest

I am still baffled with this connection problem. I have looked over my previous project that successfully connects to an external SQL Server and found no difference between the two except for the platform. Would you have a sample application made for PPC2k3 that does a simple connection to an external SQL Server or a link to one? Thank you in advance.
 

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