VBCE.com - The Premier Website For Visual Basic/CE Developers

 

*Dev Corner

Sample Code
Controls
Workarounds
Tips & Tricks
Q & A
Forums

*Goodies
Downloads
Software
Bookstore


*General
Home
What's New
General Info
Misc. Info


*News Worthy
News
Articles
Editorials
KB Articles
Reviews
Awards

*Miscellaneous
Web Links
Partners
Search
Feedback
Advertising

<% On Error Resume Next SiteStats() %>

Sponsors


More...


ADOCE How to 101 - Instructions for ADOCE on the Palm PC

Special thanks to Tony Scarpelli of 4thWay Consulting.  Tony is currently working at Maine Medical Center in Portland Maine in the Clinical Engineering Deptartment as a Computer Systems Specialist. where he tests and maintains all the medical equipment in the hospital. Tony writes and maintains the FoxPro database, inventory and purchasing applications. Tony is investigating the possibility of using the Casio E100 to give technicians the ability to enter in Work Orders at remote locations or in other parts of the hospital where computer access doesn't exist. It will also replace barcode readers that the techs currently use to track their time.

Getting Started
If you have not installed the PPC SDK, you may download the PPC SDK which includes ADOCE functionality: http://www.microsoft.com/msdownload/cetools/ppcsdk_color.asp

(If this link is innacurate, please visit http://microsoft.com/windowsce and search for the PPC development kit)

The file you download is called PPCSDK.EXE

Run this file. It will install in C:\WINDOWS CE TOOLS.


Let's Program!
Start a new PalmSize PC project in VBCE 6.0 (ADOTest). Make sure the path to the file is \wce211\ms palm size pc\ADOCE\msceadodt.dll under the PalmSize SDK directory.

Copy and paste the following code into the project:

Option Explicit

Dim x As Object

Private Sub Form_Load()
    Set x = CreateObject("adoce.recordset")
End Sub

Private Sub form_unload(cancel As Integer)
    Set x = Nothing
End Sub

Run the application on the device. If you can run this code without error, then ADOCE works on your device.

For another test to create a real data table:

Start a new PalmSize PC project in VBCE 6.0 called ADOCETest, and to be consistant make the form name frmADOCETest.

The Remote path in the menu Project/projectname Properties... should be: \ADOCETest.vb

Copy and paste the following code into the project:

Option Explicit

Private Sub Form_Load()
    CreateTable
End Sub

Private Sub CreateTable()

    Dim recEmployees

    On Error Resume Next

    Set recEmployees = CreateObject("adoce.recordset")

    recEmployees.open "CREATE TABLE xyEmployees (EmployeeID text, Name text, DateHired datetime, Evaluation text)"

    If (Err.Number <> 0) Then MsgBox "An error occured while creating the table." & vbCrLf & Err.Number & " - " & Err.Description Err.Clear Exit Sub End If

    recEmployees.Close

End Sub

This should also run without errors.

Note: all ADOCE help is in the 'Windows CE Toolkit Help...' under Help. It's in the Contents 'ADO for Windows CE'.

Download the sample code!


VBCE.com is DevX Winner!

Unless otherwise noted, all information on VBCE.com is Copyright 1998 - 2002
Windows, Windows CE, and Visual Basic are trademarks of the Microsoft Corporation.
VBCE.com is not responsible for content on external sites.
Send all feedback to webmaster@vbce.com
Webmasters - feel free to link to
VBCE.com - Premier Website for Visual Basic/CE Development

Buy Books!