Urgent!! SqlConnection doesn't work!

T

Tomer

I'm trying to connect to a sql server using this code:
Conn = new SqlConnection("Data Source=192.168.223.52; user id=sa;
password=sa; initial catalog=DBTest;Connect Timeout=30");
Conn.Open();

Also tried:
Conn = new SqlConnection("Server=P1000; user id=sa; password=sa; initial
catalog=DBTest");

but I always get the same exception:
'PlatformNotSupportedException'

I use symbol 8100/2846/mc9050 and the emulator. same result.
I have on my pc windows 2000 advanced server, do I need the BizTalk 2004
server?

what to do?
 
P

Paul G. Tobey [eMVP]

"Doesn't work" tells us nothing useful. What happens when you execute that
code? If you get an exception, what does the exception tell you? I also
notice that you don't seem to be specifying a database in your connection
string (something like "database=Northwind").

Paul T.
 
A

Alex Feinman [MVP]

The first connection string is basically correct. Try removing Connection
Timeout part and changing the IP address to an actual IP address of your SQL
Server machine.

No, you do not need Biztalk server
 
T

Tomer

Well, I tried running those changes but I always get the same exception.
( on the ppc 2002 emulator )
Are you sure that it is possible to connect a pocket pc to a desktop sql
server 2000? I don't get the impression that I should work.
 
K

Kevin Hutchison

Tomer -

MSDE is a "fully compatible version" of SQLServer - with limitations on
scalability. I don't know of any reason why it wouldn't connect. Not
having done it myself, I cannot guarantee from experience.

I would suggest two things:

1. Can you connect to this DB from the desktop? If you haven't tried,
construct a test .NET (not CF) project and attempt to connect from that.

2. Also, when I checked the archives via Google on this topic, the two
things cited most often for this exception is incompatible collation and
security issues. (Also, check for any other previous advice on the issue.)

Good luck,

- K.
 
T

Tomer

First, I'm using sql server 2000 developer edition, on windows 2000 advanced
server, and using the cf 1.0 sp2.

To your suggestions:
1. I did manage to connect to the sql server from a desktop application
(using the wizard), I even tried to copy the connection string the wizard
produced and use it on the ppc application, but still I got the same
exception.
By the way : also tried running on ce.net emulator and ppc 2003 emulator,
but got the same result.
And just to be sure I've also tried running it on a windows xp pro.

I also encountered some other folks that tried doing this, they got verious
connection error, and only one got the same exception as mine.

Tomer.
 

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