Does OpennetCF "RAPI" fit the task?

G

Guest

Hi

A requirement of my proj is to populate my local handheld SQLServerCE db using data from files on a specific PC (IP Address)on the network. I must somehow copy the files onto the handheld wirelessly (NOT docking handheld onto cradle and use ActiveSync) read the data, populate database and delete the files. The files are not SQL files but need to be formatted... If the files were SQL files (full version NOT CE version) will it make any difference? It may be that I can liase with clients to obtain SQL files with the relevant data (but to be honest it looks difficult). This will be triggered by a users click of a button (e.g "Update database" button). How can this be done? Never programmed over networks..

Using VS.Net 03 and VB.Net with Compact Framework. If Opennets RAPI does the trick then is their detailed documentation on it? What about third party software? The handhelds will be any make but running PocketPC 2000 and higher ( PPC2002/03 WinCE.Net 3.0 and higher

All replies are greatly appreciated

Look forward to all responses.
 
P

Paul G. Tobey [eMVP]

Questions:

1) Where is the 'button' that is clicked to update the database? On the
device where the database will finally reside or on some controller desktop
machine? If on the device, I'd be inclined to write a single program on the
device and just share the network PC's folder where the source file is
located, connecting to it over the network using HTTP, FTP or Microsoft file
sharing.

2) Noting that there's no such thing as an 'SQL file' that I'm aware of, are
you saying that the data is going to have to be extracted from a
currently-running database of some sort, whether SQL Server or something
else? If so, what is the current database system?

Paul T.

Trevor said:
Hi,

A requirement of my proj is to populate my local handheld SQLServerCE db
using data from files on a specific PC (IP Address)on the network. I must
somehow copy the files onto the handheld wirelessly (NOT docking handheld
onto cradle and use ActiveSync) read the data, populate database and delete
the files. The files are not SQL files but need to be formatted... If the
files were SQL files (full version NOT CE version) will it make any
difference? It may be that I can liase with clients to obtain SQL files
with the relevant data (but to be honest it looks difficult). This will be
triggered by a users click of a button (e.g "Update database" button). How
can this be done? Never programmed over networks...
Using VS.Net 03 and VB.Net with Compact Framework. If Opennets RAPI does
the trick then is their detailed documentation on it? What about third party
software? The handhelds will be any make but running PocketPC 2000 and
higher ( PPC2002/03 WinCE.Net 3.0 and higher )
 
G

Guest

Hi,

The button will be on the handheld app. With regards to the methods that you suggested (HTTP/FTP/Microsoft File Sharing) how do I implement them? Im a relative Newbie in that aspect. More importantly which is FASTEST method?

The files on the PC contain Lists and sublists and a 'product' file with all product data. The files are extracted from a btreeve database.

Thanks for your swift reponse. Just switching between sites so will reply to any responses in 30mins.

Look forward to your reply.
 
P

Paul G. Tobey [eMVP]

Well, then there's little reason to use some complicated scheme. I see
there being 2 steps to this:

1. Figure out how to get access to the data file from the PPC device.

You need to double-check what you originally said about device versions: is
that PPC2000 *and* higher or higher than PPC2000.

You may simply be able to share the folder on the source PC (you know, in
Windows Explorer, right click the folder and choose Sharing... or Sharing
and Security... or whatever is appropriate, depending on the exact OS
version. If you decide to go this way, you may be able to use the WNetXXX
network functions directly in the program to get to the file and open it and
read the data, saving it locally. If you have to do this in the code, this
is probably the harder way from .NET CF.

Alternatively, you may want to share the file via a Web server running on
the source PC or an FTP server running there. If you do that with HTTP (Web
server), you'll want to use the WebRequest class to ask for the file and get
the file contents, saving them locally. This is probably the easiest from
..NET CF.

You are going to learn network programming one way or the other...

2. Parse the file and populate the database. The exact form of this code
will depend on what the data looks like in the file, but it should be able
to be separate and independent of how the data file actually got to the
handheld device.

Paul T.

Trevor said:
Hi,

The button will be on the handheld app. With regards to the methods that
you suggested (HTTP/FTP/Microsoft File Sharing) how do I implement them? Im
a relative Newbie in that aspect. More importantly which is FASTEST method?
The files on the PC contain Lists and sublists and a 'product' file with
all product data. The files are extracted from a btreeve database.
 
G

Guest

Hi

Thanks ever so much Paul. This sounds exciting.... learning network programming and that too with latest technology...

im trying to target PPC2000 and higher versions as well as WinCE.Net handhelds that are not PocketPC. Im still a Newbie in this field so please bare with me. Actually I was thrown in the deep end and had to learn VB.NET and SQLServerCE in very short space of time (still laerning really)

I certainly have to parse/preprocess the files into an acceptable format before I move/copy them to the Handhelds. This would require a program to sit on the PC which will produce a new file/s with data in the correct format for the SQLServerCE database.

The newly produced files are what I need on the handheld. Your suggestion is to share these files via web server or FTP. How do I do this? Web Services? How does this fit into the Local Area Network Scenario? Sorry but Im new to all this

Do you mean use HTTP WebRequest from my VB.Net CF app ? Are there any FREE web servers or FTP programs

Please point me towards the technology to use and I will put full effort to learn it

Many many thanks

Trevor.
 
P

Paul G. Tobey [eMVP]

There are lots of free things floating around. I'd just use IIS, though, if
you are going to use the Web server as the source of data. Yes, you'd use
WebRequest() to talk to IIS or whatever Web server you use, and to get the
file from the server machine.

I don't see any Web Services needed in this application. I mean, there are
tons of things that you could do with browsing the database directly, rather
than exporting it to a file, etc. and you might very well want to use Web
Services for doing that, but in your case, it sounds like you already have
the ability to export this file and all you really need to do is get it to
the handheld, parse it, and put the records in a SQL CE database. That's
three technologies that you need to read up on and write little practice
programs for: talking to a Web server to get a file from it, opening a local
file and parsing it, and creating records in an SQL CE database.

Paul T.

Trevor said:
Hi,

Thanks ever so much Paul. This sounds exciting.... learning network
programming and that too with latest technology....
im trying to target PPC2000 and higher versions as well as WinCE.Net
handhelds that are not PocketPC. Im still a Newbie in this field so please
bare with me. Actually I was thrown in the deep end and had to learn VB.NET
and SQLServerCE in very short space of time (still laerning really).
I certainly have to parse/preprocess the files into an acceptable format
before I move/copy them to the Handhelds. This would require a program to
sit on the PC which will produce a new file/s with data in the correct
format for the SQLServerCE database.
The newly produced files are what I need on the handheld. Your suggestion
is to share these files via web server or FTP. How do I do this? Web
Services? How does this fit into the Local Area Network Scenario? Sorry
but Im new to all this.
Do you mean use HTTP WebRequest from my VB.Net CF app ? Are there any
FREE web servers or FTP programs?
 
G

Guest

Hi Paul

Im a little confused... you stated " it sounds like you already have the ability to export this file"....
Im not sure.... I guess want I want to know is 'how to do this'....'How to get the files to the handheld' I understand that I have to read the files with data and parse them into a desired format and this should be done by and app sitting on the PC that the files reside on. All I Know is that I have a LAN, a Wireless Handheld with my app and the files on a PC that sits on the LAN.

With regards to IIS.... is this free? if not whats the free alternative? The PC with the data files will most likely be low spec such as 150MHz and 64MB RAM.... thats a minimum spec...

Maybe you can sum it up for me

An App that sits on PC Yes/No
How to Send/Get files from Handheld using .Net CF
FREE technologies to use

Many Thanks

Trevor.
 
P

Paul G. Tobey [eMVP]

You have the file on a disk on a PC. I've said that using a Web server is a
relatively easy way to make that file available to your .NET CF program. If
you also have to write a desktop program to extract that file on the PC,
then this may not be the best architecture for you. You could, in that
case, write a Web service to run on the PC and write your .NET CF code to
get the data directly from the database, via the Web service, and put it in
the handheld's local database without any file copying.

*You* have to decide what the initial conditions are. I'd buy a faster PC
with Windows XP Pro on it, which comes with IIS, and set it up to use
regular Web stuff to send the file around to the handhelds. Total cost:
about $500. Note that this is just about 1 day's worth of the cost of a
programmer, so saying that somehow using free software that requires a week
to set up is cheaper is crazy. At that point, *you* have to decide whether
exporting the desktop database to a file is sensible or whether you should
write a Web service to run on the desktop PC (still running IIS), and make
the database data available via that Web service.

Once you've decided on the above, decide whether the handheld devices will
always be on the network or not. If not, then you still need to populate
the local database. If they will, and if you chose to use a Web service
above, you can simply write the handheld programs to use the data live. I
can't tell you what's right because I know nothing about your environment.

Paul T.

Trevor said:
Hi Paul,

Im a little confused... you stated " it sounds like you already have the
ability to export this file"....
Im not sure.... I guess want I want to know is 'how to do this'....'How to
get the files to the handheld' I understand that I have to read the files
with data and parse them into a desired format and this should be done by
and app sitting on the PC that the files reside on. All I Know is that I
have a LAN, a Wireless Handheld with my app and the files on a PC that sits
on the LAN.
With regards to IIS.... is this free? if not whats the free alternative?
The PC with the data files will most likely be low spec such as 150MHz and
64MB RAM.... thats a minimum spec...
 
G

Guest

Hi Paul

ok, I want to close this chapter and start writing some practice programs. Last bit of clarification please

If I decide to go the Webserver route and use either PWS (Win 98) or IIS (WinXP Pro) - both which are freely available with Windows, then these are the steps ive thought up

1) Write an app (App A) that picks up the data file (A) from the PC and parses it to the required format to File
2) The app will then copy file B to a specified directory in the WebServer (PWS or IIS)
3) Use HTTP commands from my VB.NET .CF application to retrieve the file to the handheld
4) Use File B to populate SQLServerCE database

How does that sound? Anything else to consider or look out for?

Also

My handheld app (App B) is communicating on a network port using UDP comms (using UDPClient class). As an alternative would it be possible, without conflicts, that App A (on PC) starts a TCP session with App B (on a worker Thread) and the parsed files are sent in that way? Will the overhead be large when using TCP

But then I can slightly modify the UDP comms im using to fit the needs of the data files... UDP has much less overhead compared to TCP

What are your Final suggestions? Im not going to persist in questioning anymore, you've helped considerably

Thanks
 
G

Guest

Hi

I forgot to mention.... will running PWS on a low spec (150Mhz and 64MB RAM) machine cause serous performance problems for other apps that are running at same time? Is this the same for XP Pro? The min spec of the PC's that have XP Pro is 733Mhz and 128MB RAM.

Much Appreciated

Thanks.
 
P

Paul G. Tobey [eMVP]

If you are going to use Web services, you might want one of the steps to
have something to do with them! None of the things that you mention there
are Web service-related at all. Running the Web server is not the same as
Web services. A Web service is an 'application' which can accept data from
and return data to clients which connect to it via a Web server which is
hosting the service. That's why I suggested that, if the handhelds are
always in contact with the network, you could simply have them communicate
with a Web service, querying the data that they need in real-time, rather
than populating a local database every so often.

On the network end, the entire sockets paradigm was created so that you
don't care what other threads might be doing. Yes, you can intermix TCP and
UDP. No, they won't conflict with each other (as long as you don't try to
use the same port number).

As for the question in the other message, the Web server is only going to be
using processor cycles when someone is talking to it. If you have a couple
of hundred handhelds contacting the server one after the other, so that it's
always busy, yes, that will affect the operation of other processes running
on the thing. Again, you can 10x that processor speed, etc. for $500. You
should do that.

Paul T.

Trevor said:
Hi Paul,

ok, I want to close this chapter and start writing some practice programs.
Last bit of clarification please.
If I decide to go the Webserver route and use either PWS (Win 98) or IIS
(WinXP Pro) - both which are freely available with Windows, then these are
the steps ive thought up:
1) Write an app (App A) that picks up the data file (A) from the PC and
parses it to the required format to File B
2) The app will then copy file B to a specified directory in the WebServer (PWS or IIS).
3) Use HTTP commands from my VB.NET .CF application to retrieve the file to the handheld.
4) Use File B to populate SQLServerCE database.

How does that sound? Anything else to consider or look out for?

Also,

My handheld app (App B) is communicating on a network port using UDP comms
(using UDPClient class). As an alternative would it be possible, without
conflicts, that App A (on PC) starts a TCP session with App B (on a worker
Thread) and the parsed files are sent in that way? Will the overhead be
large when using TCP?
But then I can slightly modify the UDP comms im using to fit the needs of
the data files... UDP has much less overhead compared to TCP.
What are your Final suggestions? Im not going to persist in questioning
anymore, you've helped considerably.
 
C

Chris Stephens

Sounds like the three most obvious solutions are :-

1. Retrieve an XML recordset, either as a file or from a web service
(possibly too slow)

2. Use 'RDA' to retrieve the data directly from a SQL server or MSDE (free)
database via IIS

3. Use the SQLClient to connect directly to a SQL server or MSDE database

Solutions involving transferring a file like a CSV file, extracting the data
and running multiple insert statements to get the data into the local
database tend to be slow, the bottle neck is the 'inserting' of records.
But, the performance may be ok for your situation.

Chris.



Trevor said:
Hi,

A requirement of my proj is to populate my local handheld SQLServerCE db
using data from files on a specific PC (IP Address)on the network. I must
somehow copy the files onto the handheld wirelessly (NOT docking handheld
onto cradle and use ActiveSync) read the data, populate database and delete
the files. The files are not SQL files but need to be formatted... If the
files were SQL files (full version NOT CE version) will it make any
difference? It may be that I can liase with clients to obtain SQL files
with the relevant data (but to be honest it looks difficult). This will be
triggered by a users click of a button (e.g "Update database" button). How
can this be done? Never programmed over networks...
Using VS.Net 03 and VB.Net with Compact Framework. If Opennets RAPI does
the trick then is their detailed documentation on it? What about third party
software? The handhelds will be any make but running PocketPC 2000 and
higher ( PPC2002/03 WinCE.Net 3.0 and higher )
 

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