Skip to main content

Past Blast

Featured Products

Windows Mobile Developer Controls
Windows Mobile Developer Controls
Stay in touch using the DEVBUSS RSS feeds.
 

News

Windows Mobile Developer Controls
Windows Mobile Developer Controls

eVB Database Viewer

Written by Jason Freih  [author's bio]  [read 64043 times]
Edited by Derek

Download the code

Page 1  Page 2  Page 3  Page 4  Page 5  Page 6 

I would like to start this article by thanking deVBuzz and all it's contributors. To date it is the only site I have found that is truly dedicated to sharing information about eVB development. It's because of their generosity that I am now on the fast track to fame, fortune and adoration by millions.

I got into programming for the PocketPC platform only a little while ago. Although I had owned a Casio E-100 for almost two years, it wasn't until my company started handing out iPaq's to some its people that I really got into it. Promising that I could develop useful programs, for the management, was the only way I could convince them that I too was worthy of having one.

My next challenge was to figure out what to program. More then anything I wanted to be able to download information from the numerous Access programs we have around the office and view it on the spot. Having that ability would be very useful at meetings. Simply download the information about the project discussed, and if necessary pull the tables on the iPaq and recite some figures. It really impresses the management.

At first I downloaded a few shareware utilities that promised to let me perform such tasks. Most notably were HandyDB and abcDatabase. Both were Ok, but I am very particular about how I like to manage information, and I hate to pay for anything I could build my self. With that in mind I started to build my own cdb table utility.

I love my iPaq but it is a love/hate relationship, because I also love to see the "big picture". Whenever I view a huge table of information, or create flow a chart I always reduce the view size so that I can see as much information as possible. Notably a Palmtop's small screen is not conducive to such mentality. So my challenge was how to get the most out its small screen. I promptly discarded the idea of using menus, I hate drilling down through them to find the one option I need to execute, and even more I hate explaining it to users. Next I abandoned the idea of using tabs, it gives users the ability to skips steps like selecting a database and table. You have no idea how many people will go straight for the "show me" option, even though they never went through the selection steps.

With all that in mind I will try to explain my program. Please keep in mind that what I am sharing with you today is by no means the final product. If anybody finds a better way to perform any of the functions and task in this article I, and I am sure rest of the deVBuzz community, would greatly appreciate it.

I separated the screen, into four areas. At the top is a text box and drop down list, changing positions as required. At the bottom the screen, is a label where the messages are displayed. Just above that are all the buttons used to navigate through the program, and finally in the middle taking most of the screen is the grid where all the information is displayed.

The program uses one form, and one module. I selected to put certain functions in the module because as the program grows new forms will have to be added and certain information will have to be shared by them.

We start by defining a few global variables and opening the Form, through the Main module

Option Explicit

Public conndb As ADOCE.Connection

Public rsTables As ADOCE.Recordset 'Recordset reads MSysTables
Public rsRecords As ADOCE.Recordset 'Recordset reads MSysFields
Public rsWorkingTbl As ADOCE.Recordset 'Recordset used to view data

Public sSelect As String
Public sFields As String
Public sTable As String
Public sTableNo As String
Public iRecCnt As Integer

Public sSQL As String
Public sList As String

Public Sub Main()
'Start Program
Form1.Show
End Sub

CODE 1 (Main Module)

From there the Form opens up and initializes the screen setup.

Option Explicit

Private Sub Form_Load()
lblDispMsg.Caption = "Press the button above to Start"

'Use the BtnShow function to hide and display as required
BtnShow ("100000000")
End Sub

CODE 2 (Form)


When the program starts you may display whatever you feel is necessary. Logo, Copyright Information, Helpful hints and more. At the bottom is the button that urges the user to select a database. You could launch the CommonDialog box immediately at this point, but this the only time you will have the chance to display the information about who you are and who is responsible for providing this wonderful program.

Once the user presses the Select Database Button the common dialog box comes up and displays all the available cdb's.

Next Page