Connecting to SQL Server 2000 with VB.net on Pocket PC 2003

J

Joe

Hi,

I have been trying to create a connection to my SQL Server 2000 from
Pocket PC 2003, over a wireless network connection. The connection
always fails with the SQLException "SQL Server does not exist or
access denied".

It does the same both on the emulator and the device. I have tried
about 10 varieties of connection strings, and am very confident that
there is nothing wrong with it. The SQL Server is definitely running
and accessible, as we run another application which accesses it from
all of our computers on the network. Also I can browse to the SQL
Server and its databases through the browser available in Visual
studio, and in a windows vb.net app, the connection succeeds, using
the SQLConnection component available.

I am currently tring the Northwind application recommended in the
previous thread:
http://groups.google.com/groups?hl=...soft.public.dotnet.framework.compactframework

located at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnroad/html/road08272002.asp

I am using the connection string:
"user id=sa;password=pass;database=NorthWind;server=100.0.1.24"

I have tried both the name and the ip address, and a host of other
combinations
in connection strings, but always have the same problem.
The wireless network connection from the PDA can access the computer
running
SQL server, although it takes time, and the computer running the
emulator is
connected to it by wires and this still has the same problem.

Anyone got any ideas why this isn't working?

Thanks,
Joe
 
G

Guest

Hi Joe!!!

I have never done what you're trying to do, but I have some tips that
helped me during a socket connection issue I had:

* In regards of your PDA device, make sure that its subnet mask includes
both IP addresses: the PDA and the SQL server. If they are not, then chances
are that there is a router in the middle, and the problem might reside in the
router. Note that some access points behave as routers, and some others just
like bridges.
* Log on into a shared folder in the SQL server, and then try your
application. If it succesful, then there is a security issue.
* If you are using the PPC emulator, change its name. I don't know why, but
it helps.

Good luck!!!

Tarh Ik
 
G

Guest

I forgot to mention that once you change the computer name of the
emulator, you might need to retry your debugging twice since the first time
always fails due to a communication / time out issue. However the second one
always succeeds. This is documented somewhere in the msdn web site.
 
G

Guest

If the previous tips did not work, try this:

* Go to Settings -> Connections -> Connections
* On the new window, go to Advanced -> Select Networks
* On the new window, Select "My Work Network" in both the "Programs that
automatically connect to the Internet should connect using" and "Programs
that automatically connect to a private network should connect using"
* On "My Network card Connects to", change it to "Work"
* Click on "Edit", then go to Proxy Settings, and make sure that the "This
network connects to the Internet" is checked.

Good luck!
 
Z

Zief

Thanks for the replies, unfortunately none of your suggestions worked.
Although I do not know how to change the network name of the pocket pc?

However, I am not sure that changing the name will make it work anyway,
and have a feeling the problem may be elsewhere, either a simple thing I
am missing in the code, or a network problem.

I've gone through everything I can think of though, and according to the
examples it should work.

Any further help much appreciated,
Zief
 
G

Guest

Hi Zief!!!

Well, I change the computer name of the Pocket PC emulator because
otherwise if I try to connect to the local network it tells me that a
computer with the same name already exist and that therefore I won't be able
to connect.

Of course, this only applies to the emulator. I don't know what could be
the problem with your real devices.

Hope it helps!!!

Tarh ik
 

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