Connect to SQL Server on desktop while cradled

J

Jeff

Hello,

I am reading conflicting things on the Internet regarding the ability to
connect from a custom application on a PPC 2003 device to a SQL server while
cradled with ActiveSync 3.7. The SQL Server is on the desktop that acts as
the replication partner. The IP address of the device is 192.168.55.101
and the desktop is 192.168.5.X so I wouldn't think that SQL on the desktop
would be accessible from the device. I have seen some messages in
newsgroups indicating that it is possible when referencing
System.Data.SQLClient in code and specifying a connection string that uses
the server's IP address and user id and password.

Does anyone know if this is possible?

Thanks,
Jeff
 
G

Guest

Hello Jeff,

There are several ways to get the SQL data to your handheld. I recomend
creating a SQL CE Database. Do do this you need to use Replication. There
are two kinds of replication RDA replication and merge replication. You need
to setup a SQL CE Server. Whats the difference you may ask? RDA is accessing
published SQL data directly. Merge Replication is copying the whole thing. I
have used active sync to get internet connection to replicate. If you
already have replication working but does not work with replication while
using active sync you may need to make sure you have internet sharing turned
on through active sync. The information that I found says you can set up
active-sync to copy the .sdf file from one handheld to multiple handhelds
once the local datatabase (.sdf file) is created. Or you could take the easy
way out and use active sync to convert a SQL database to a ODBC database on
the handheld. I think 1H 2005 Active sync ver 4 will be released and is
rumored to have SQL Replication as an option... Untill then looks like we
actually have to make an effort to crank out a working connection string sa
passwords and internet logins.

Goodluck John R.

Goodluck,
John R.
 
A

Alex Feinman [MVP]

It should work with a conn ctring like this:
"Data Source=192.168.5.1;User ID=user;Password=password;Initial
Catalog=pubs";
 
J

Jeff Cross

Thank you Alex. I tried the connection string and still did not have
any luck. I'm getting a sqlexception error on the open method of SQL
Server does not exist or access denied. Any other ideas?
 
G

Guest

I am able to connect with a desktop app via the host name and (local)
but NOT IP Address. I'm assuming this is part of the problem when
connecting from a Pocket PC. I'll research the desktop/ip address
issue. Any ideas?
 
G

Guest

Well, I think I have things worked out. I found that I had a named
instance and a default instance on my SQL Server (I want to connect to
the default instance). I went into the SQL Server Network Configuration
utility and selected to "Hide" the named instance. After restarting the
SQL services, I was able to connect via a Win32 .NET desktop app by IP
address and then from the pocket pc by IP address. Alex, thanks for
your suggestion to try it from the desktop - it got me on the right
track.

Jeff
 

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