Database Connection

Please excuse my ignorance, but this is the first time I have had to deal with Pocket Pc's.

I need to develop an app for a Pocket PC running (I think) 2002.  I have a copy of eMbedded vb 3.0 and the coding seems very similar to VB6 (not a problem, but only tested on the emulator).

The problem I have is the app will need to connect to a remote mdb database, the way I would normally complete this on standard windows clients, is to pull the connection string from the registry which is set up during the installation of the app.

3 questions really,

1) Is it possible to connect to a remote mdb as oppose to a local cdb using ADO / DAO if so please can you supply some assistance
2) Do Pocket PC's contain a registry in the same structure as a standard windows platform, and is it accesible e.g. SaveSetting / GetSetting
3) Can you prevent the interactive keyboard from automatically popping up when a text box get the focus. ( just because it reduces the screen capabilities

The equipment is a Symbol Pocket PC PDT 8146
LVL 2
samstarkeyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CJCraftCommented:
You could use SQL CE Merge replication to sync and cache a local copy and then synchronize change back up to server.

Or you could use third party tool:

http://www.odysseysoftware.com/products_viaxml.asp

http://www.odysseysoftware.com/documents/ViaXML-eVB-Example1.zip

If you are comfortable with XML you could consider the following:

http://www.devbuzz.com/content/zinc_evb_xml_db_connector_pg1.asp

Registry exists on Pocket PC very similar to desktop here is an example:

http://www.devbuzz.com/content/zinc_eVB_and_CE_registry_pg1.asp

There should be a SIP (Software Input Panel) control that you can place on a form to control the SIP functionality.
Mikal613Commented:
1)No you cannot Connect to a remote MDB because its is not recognized as anything from evb.
2)The registry is almost exact
3)http://support.microsoft.com/default.aspx?scid=kb;en-us;265799

to hide the Keybaord
Mikal613Commented:
Also

there is a 2003 update for you which means that you can use .net 2003 and YES you can update a MDB directly

http://software.symbol.com/detail.cfm?prod=1735

IF your gonna do the update tell me so i can tell you how to update the MDB directly
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

samstarkeyAuthor Commented:
If i give you an idea of what i'm trying to achieve, perhapes you could advise if this is the best approach.

I have an asset tracking system that has been working fine for a long time, but recently the products sizes have increased and the quantaties trebled.  This makes my system impractical as you need to bring the product up to the system to be scanned.

The system records the product code, queries a database and if the product exists enters the description. It then asks for the asset tag or serial number.  If the product does not exist, it requires the description to be inserted manually. Once completed, it adds these records to the database and allocates each product a shelf space(this is completed once all products have been scanned).

Once in the location, the transfers are completed manually by asset tag / serial number from the system.

I would like just the scanning section of the system to be completed by a hand held system, I was looking at RF scanners but this would cause problems with not visually seeing the cursor location, or any errors that may have occured.  So the only other option is to go for Pocket PC's.  

I do not want to get into replication with the Pocket PC due to the size of the database and web based will require some serious asp programming (not my forte) due to the structure of the system and the database queries.

Any thoughts???
CJCraftCommented:
Here are a couple options:

Pocket PC application that records the products code to a file, xml, csv, etc. And then have an upload button that batch uploads the records for processing. FTP is an option or ActiveSync's RAPI can be used etc.

A little more sophisticated is having the product codes, with their descriptions download to the handheld, so this step can be done on the handheld instead of after the upload where it is more likely the user will not be sure. Trade off there, for sure. But a resonable task I think.

Af far as how to move data up and down you really do have a lot of options. You could use FTP. You could have a pocket access database, etc.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
samstarkeyAuthor Commented:
OK,  I have decided to go down the cdb route, with a one way replication(have not tested this bit yet).

I have set up the app to read the database as required and update the listboxes with the relevant data. No problem

The problem I now face is im getting an error of "Not enough storage to complete this operation" .  Could this be something to do with the memory leakage in adoce that I have been reading about so much.  It shouldnt be as I only create the object once.  
My code:

Dim rsdata2
Dim x
Dim y
Dim frmdate
Dim frmtime
frmdate = FormatDateTime(Now(), vbShortDate)
frmtime = FormatDateTime(Now(), vbShortTime)
If validator = False Then Exit Sub
Set rsdata2 = CreateObject("ADOCE.Recordset.3.0")
rsdata2.Open "deliveries", strActiveConnection2, adOpenKeyset, adLockOptimistic
For x = 0 To lstprod.ListCount - 1
rsdata2.AddNew
rsdata2.Fields("customer") = Deliveries.CombCust.Text
rsdata2.Fields("productid") = lstprod.List(x)
rsdata2.Fields("productdesc") = lstdesc.List(x)
rsdata2.Fields("serial") = lstsn.List(x)
rsdata2.Fields("deldate") = frmdate
rsdata2.Fields("deltime") = frmtime
rsdata2.Fields("checkedby") = Deliveries.checkedby.Text
rsdata2.Fields("deliverynumber") = Deliveries.PONO.Text
rsdata2.Fields("condition") = Deliveries.combcond.Text
rsdata2.Fields("notes") = Deliveries.notes.Text
rsdata2.Update
Next x
rsdata2.Close
rsdata2.Open "masterstock", strActiveConnection2, adOpenKeyset, adLockOptimistic
For y = 0 To lstprod.ListCount - 1
rsdata2.AddNew
rsdata2.Fields("customer") = Deliveries.CombCust.Text
rsdata2.Fields("productid") = lstprod.List(x)
rsdata2.Fields("productdesc") = lstdesc.List(x)
rsdata2.Fields("serial") = lstsn.List(x)
rsdata2.Fields("deliverynumber") = Deliveries.PONO.Text
rsdata2.Fields("condition") = Deliveries.combcond.Text
rsdata2.Fields("notes") = Deliveries.notes.Text
rsdata2.Update
Next y
rsdata2.Close
rsdata2.Open "summaryofdeliveries", strActiveConnection2, adOpenKeyset, adLockOptimistic
rsdata2.AddNew
rsdata2.Fields("customer") = Deliveries.CombCust.Text
rsdata2.Fields("deliverynumber") = Deliveries.PONO.Text
rsdata2.Fields("Notes") = Deliveries.notes.Text
rsdata2.Fields("delate") = frmdate
rsdata2.Fields("deltime") = frmtime
rsdata2.Fields("Checkedby") = Deliveries.checkedby.Text
rsdata2.Fields("totalqty") = lstprod.ListCount
rsdata2.Update
rsdata2.Close
Deliveries.combcond.Text = ""
Deliveries.CombCust = ""
Deliveries.notes.Text = ""
Deliveries.PONO.textt = ""
Deliveries.checkedby = ""
Unload Me

samstarkeyAuthor Commented:
sorry the references under the for Y do actually point to Y not X
samstarkeyAuthor Commented:
Never mind, I  managed to Sort it.

Thanks for all the help.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Smartphone Programming

From novice to tech pro — start learning today.