database access for windows CE VB.net 3.5

  • I have been developing my CE application such that the user can create an empty database (.sdf file in the CE device) and then use it. So far the create works and I can put data into it and see it in a grid.

    I want a form with Next/Previous/Find that shows the data in a table ( or a query )

    When I used to work with VB 6.0 there was a data control but it is not here for targeting the CE device.

    If anyone could suggest an approach re how to do this with VB code and/or what controls to use it would be great.

    Bill

  • Hi Bill.

    Oddly, your question comes at a neat time for Application Development demos at Psion.

    In VB6 you had navigation controls to do database record management in Classic Windows UI (Windows 98/2000/XP -- WIN32).

    In VB.NET (VS2008) and the SqlServerCE controls, you do not have this luxury -- like you would on WIN32 desktops I illustrate above.

    Instead, you need to use classic button controls to navigate record by record and insert by insert.  

    Largely in compact devices, a GridControl populated upon Form Load -- is used to select (or allow selectability and sorting) but on devices like the EP10 this results in a mode change to using a stylus rather than a touch control.

    But keeping the Mode Change from occuring leaves you to use the Ugly - Record - By -Record  button controls.

    I will update this page when I have composed a basic .SDF SQLCE type of demo for data recording and population and navigation.

    -sean

    Sean M. Kennedy  {Americas Help Desk Application Support}

  • Hi Bill.

    I am going to write a programmatical BLOG on the development issue I encountered for this solution but... To answer your original topic request please look at the following demo:

    http://community.psion.com/downloads/developer_sdkhdk/m/sample__demo_code/34677.aspx

     

    This is Part II of the SQL on Psion devices, and in this case, this is the data navigation I referred to.  And Yes, this is the Ugly - Record - By - Record controls version I alluded to.

    Please let me know if this helps you Bill.

    -sean

    Sean M. Kennedy  {Americas Help Desk Application Support}

  • Sean,

    I have finally gotten around to trying to download and looking at that example and it is for windows mobile 6 as a platform.Thanks for that!

    Currently I am developing my application for a target windows CE device and I don't have the mobile 6 SDK installed yet in my development box. I am going to do that now but it brings a question to my mind. Eventually I will want my application to be targeted at newer devices that may come along. What are the pitfalls here if any?I have been assuming that if it runs well on the oldest platform then it will be easy to create a version for a newer platform.

    Bill

  • Bill

    What are the pitfalls here if any?I have been assuming that if it runs well on the oldest platform then it will be easy to create a version for a newer platform.

    When it comes to Windows CE/Mobile (hand-held Windows systems), things can vary greatly between operating system versions and .NET runtimes.

    If this question is centered solely around SQL, then I wouldn't expect much to worry about.  Verify that the new platform uses the same Compact Framework that you are compiling against.

    Beyond that, you have to worry about things such as whether the display is VGA vs. QVGA:  see this http://social.msdn.microsoft.com/Forums/en-US/netfxcompact/thread/636e94ed-08ec-490f-a008-8ac80855023c

    Some APIs don't work from version to version (such as RAS on older Windows CE 5/4.2 devices don't work as-is on Windows Mobile).

    If the device operating system stays the same, then generally you shouldn't have to worry too much.