Cannot connect using GPRS and System.Data.SQLClient to remote SQL Server

P

Paul Bell

Hello

I am developing a Pocket PC (XDA 2 - Windows Mobile 2003) application
that needs to connect to a remote SQL Server 2000 database via GPRS.

I am hosting a test database myself so have full control over the
environment. The desktop machine currently has SQL Server 2000 (mixed
mode authentication) and IIS with SQL Server 2000 CE Agent installed
and all the latest service packs.

The problem I am having is that I cannot connect to the remote
database using System.Data.SQLClient namespace when connected via
GPRS. I can use SQLClient happily when connected to the desktop
machine via Activesync – even if the desktop SQL Server does not have
SQL Server CE Agent installed. However if I try the same code to
connect via GPRS it refuses to connect. I can however connect via GPRS
using RDA, if SQL Server CE Agent is installed and setup, but I was
hoping to use the added flexibility of the SQLClient namespace.

I've read that SQLClient only works in fully connected scenarios. Does
this mean that it only works through Activesync? Do I need to use a
different connection string when connecting over GPRS than through
Activesync?

Thanks for your help

Paul
 
G

Guest

Paul,

While you can theoretically connect to a SQL Server database through GPRS
using the SQL Client, this is not a great architectural decision. The SQL
Client is provided for direct access to SQL Server in mostly-connected or
always-connected situations with high bandwidth, which normally means a
device that is on an 802.11 wireless LAN (in a warehouse, office building,
etc). GPRS is going to give you about 40kbps of bandwidth max and is
certainly not a mostly-connected scenario. I use RDA or a web-services
synchronization strategy whenever I'm in a WWAN/GPRS scenario.

If you really want to pursue a direct connection to SQL Server, please post
more detail on the specific connection error you are receiving. Also
consider whether you're going through a firewall from the GPRS network to
your SQL Server instance.

-Darren
 
P

Paul Bell

I have been trying to just use RDA, but I feel I would like to get a
few tests running with SQLClient frist to see how it behaves, as it
offers me more flexibility than RDA for what I need at the moment.

When I try connecting to the SQL Server, SQLClient reports it cannot
find the SQL Server or access is denied. I know my access credentials
are correct, because I can connect via RDA.

I have also thought about the fact that the GPRS network that the
Pocket PC is connected to might be blocking ports with a firewall - I
am using Vodafone which assigns internal dynamic IP addresses to the
Pocket PC so must be going through some internal Vodafone
servers/firewalls. I have tried using the Pocket PC as a modem for a
PC and can browse web pages succesfully, but not connect to the SQL
Server either, so it does seem the SQL Server calls are being blocked.
I will investigate this further.

Does anyone know if it is possible to set the communication port for
SQL Server to port 80 (http) reliably? Or is this a big no, no?

Thanks

Paul
 
A

Alex Feinman [MVP]

What you are doing is highly irregular. Yes, it is possible theoretically to
set the port used by the SQL server to 80 (you do it by using Server Network
Configuration tool). But you open a large security hole and this is just
half of it. SQL Server communication protocol is highly ineffective over
slow links. RDA works in an entirely different manner. Do not expect
anything even remotely similar with direct SQL server access. I urge you to
reconsider your approach. If you could provide your reasons for doing this,
perhaps we could go over it and see if you indeed need to go this way
 
G

Guest

I too am developing an application for on a windows CE.NET platform and need
to go offsite to gain access to data we have stored in our office.

We will be using GPRS as that is what our PDA's use.

Would the best option to be to use a webservice that has direct access to
the DB and returns the data to me?

Thanks guys.
 

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