How can we connect a PDA with Windows CE.NET to a Database on a PC

September 26th, 2005 - 08:45 pm ET by bakzip | Report spam
Hi,

We have an application installed on a PDA with Windows CE .NET and Visual
Basic .NET as the language.

We have customers with a huge variety of Databases (MS Access, SQL Server,
Paradox, MySQL, FoxPro, XBase (Dbase)).

We need to connect on line to them.

But Windows CE doesn't has ODBC (only SQL for CE)

We know we can do it by creating a "Server" and a "Client" (the PDA) and via
winsocks communicate them.

But it won't work because we need to update the Databases on line.

What can we do?
Regards
email Follow the discussionReplies 2 repliesReplies Make a reply

Replies

#1 Serdar Aytamaner
October 05th, 2005 - 09:57 am ET | Report spam
Hi,

Besides SqlCE namespace for local database access,
.NET Compact Framework has another namespace, called SqlClient.
You can use it to access data on an SQLServer database directly.
You can also use this namespace to access other databases, via
SQLServer.

To achieve this :
Run SQL Server Enterprise Manager, find your server,
open "Security" branch of the tree, right-click on "Linked Servers",
and click on "New Linked Server". Create a new entry for each
of other databases (Select appropriate ODBC or OLEDB
driver for each database. Filling the product name, data source
and provider string fields may be a little tricky and you may
need to look for some documentation.) This way, you'll have
access to those linked servers via SQLServer.

Then you'll need to use four part object naming convention
(server.database.owner.object) in your SQL statements.
You may have to omit some parts of this fully-qualified names
but the rules may differ from one database to the other.

For example, I've been using this method to access Oracle
database via SQLServer. Let's say we need to access
the "customers" table owned by "crm" user (schema in Oracle)
at the linked-server we named "orasvr".
Since Oracle doesn't have a concept of database names,
we have to omit database part of the name. So our
sample SQL statement should look like this :
"select * from orasvr..crm.customers"
(note the double dot after server name, to omit database name)

I suppose that your customers' databases are on their own sites
and servers (i.e. you can't access them via a WAN or Internet),
so you'll need to set up an SQLServer for each of them.
If purchasing new licenses is a problem, then you can use
MSDE (Desktop Engine). It's a scaled-down version of
SQLServer and it should support linked-server method
as far as I can remember.

You should remember to install client software for the database
you are trying to access (if required), on the same machine that
you installed SQLServer or MSDE.

Regards,
Serdar Aytamaner
Istanbul, Turkey


"<ctacke/>" <ctacke_AT_OpenNETCF_com> wrote in message
news:
Um, a "client and server" model is the only way to do the live updates. A
web service, a proprietary comm layer or something similar come to mind.

-Chris

"bakzip" wrote in message
news:
Hi,

We have an application installed on a PDA with Windows CE .NET and Visual
Basic .NET as the language.

We have customers with a huge variety of Databases (MS Access, SQL
Server,
Paradox, MySQL, FoxPro, XBase (Dbase)).

We need to connect on line to them.

But Windows CE doesn't has ODBC (only SQL for CE)

We know we can do it by creating a "Server" and a "Client" (the PDA) and
via
winsocks communicate them.

But it won't work because we need to update the Databases on line.

What can we do?
Regards







Similar topics