Quadmore Software Services
 
 
 



Open Source time tracking using Sybase Powerbuilder and Microsoft Access
Johanne's Time Organizer version 3.0
Conceived / coded / copyright 2002 by Bert Szoghy, email: webmaster@quadmore.com

Last code update: March 9 2004
Last page update: March 25 2004

"Johanne's Time Organizer" is a Windows time tracking utility which can be used to print reports, take general notes about time spent with someone, and to note billing information. JTO is lightweight and fast. It was programmed using Sybase Powerbuilder 7 for Windows and Microsoft Access 2000.

If you need a time tracking software and this fits your needs, you are welcome to it.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation; This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. Everything is provided as is, as described in the file "GNU General Public License.txt".

The software has been thoroughly tested in Windows 98, ME, NT 4 and 2000. It should work fine on Windows XP and 2003.

Click here to download the Windows application

Click here to download the source code

Known issues:
  • The built-in email functionality will not be reliable on Windows 2000, XP and 2003 as it depends on MAPI which was superceded by newer Microsoft messaging objects. For MAPI to work, you will need to have Microsoft Outlook installed on the same machine. The reference: http://support.microsoft.com/default.aspx?scid=kb;en-us;238085. Any Outlook version will do, including Outlook 2003 as indicated by this reference. This said, correspondent Colin Millard of Surrey, British Columbia wrote me: "I found the email window useful, to see how using MAPI could be used to send e-mail, I have used my application on Windows 2000 with no problems to send to multiple e-mail address with up to three attachments". Thanks for writing, Colin!


  • The application was designed to run only one instance at a time. If you intend to run multiple instances of the application at the same time and to share updates between the two instances, you need to add explicit "commits" to the SQL statements. With Powerbuilder and Access, this normally happens automatically when you close the application.

  • On Windows XP only, the "Billable" label in the main window becomes ":Billable" (with a preceding colon character). This is a cosmetic bug which does not go away even if you go CONTROL PANEL > DISPLAY > select "Windows Classic" theme. Cause is unknown. Workaround I would suggest is to recompile on XP, let me know how that works out if you try that. On NT4, the same window looks like this:



JTO as viewed on NT4

You will need administrative privileges on Windows 2000, XP and 2003 to install JTO.

To install: download the zip, extract all the files to a directory on your hard drive. Create an ODBC data source and verify the Windows Regional Settings Short Date format, both as explained in the file "Manual ODBC Install.txt". In mid-October 2003, I added a new HTML document with screen captures on how to do the ODBC and Regional Settings adjustment in Windows XP, it's the exact same procedure in Windows NT4 and Windows 2000.

Once installed, double-click "jojotime.exe" to start the app.

This project is Open Source. The complete Powerbuilder source code is provided as a seperate download on this page. The code compiles cleanly on Windows 98 (build 4.10.1998) using Sybase Powerbuilder version 7.0.3. With previous version 7 builds, you will encounter a known Powerbuilder bug when sending email through MAPI where ugly "HEAP ERROR" dialogs pop up (but the email is sent successfully nevertheless).

Both the software and source code zip files are about 5 megs in size.

You are free to do whatever you want with the code. I will ask you however to please send me an email to let me know if this was useful to you. I intend to create a guestbook of these emails. Such online comments, once indexed by Internet search engines, might also steer other desperate developers to find this project, helping them out in turn. There are not enough Powerbuilder code samples out there and few developers use Powerbuilder to create lightweight applications, which compounds the problem.

"Johanne's Time Organizer" is currently being used to demo Powerbuilder functionality through a web portal product called Vapi by the VapiSoft Company in Israel.

JTO was initially coded as an exercise to learn and especially review the different Powerbuilder features. Then it was shelved and forgotten. Recently, when a programmer friend was trying to learn Powerbuilder for the first time, I lent him this application so he could grasp the essentials as well as some crucial tricks. The experience led me to think this code might be useful to someone else, so I am now putting it online to help out other developers new to Powerbuilder.

The version of the Powerbuilder DLL's accompanying the application must match the DLL's of the Powerbuilder version used to compile. I am including the 4 required DLL's (libjcc.dll,pbdwe70.dll,pbodb70.dll,pbvm70.dll) and am assuming you are using version 7.0.3. If you are using a different version of Powerbuilder, and can compile with no problem, make sure you substitute the newer DLL's before running the jojotime.exe (or you will likely encounter a "DDE error"). If you are trying to compile with a later version of Powerbuilder and are encountering errors either when compiling or when starting the app, I am sorry to say, "You're on your own". Solve the problem and please drop me a line to let me know how you solved it. I will add it to the FAQ.

Johanne's Time Organizer Version 3.0 has additional Client window entry fields, a new web page client list generator, better handling of the application connection to the data source, and a few bug fixes as well.

I really love Powerbuilder to code Win32 database apps. Visual Basic has its bells and whistles, but it also has DLL (now .NET framework security patch version) hell. Although the Powerbuilder IDE for version 7 had many developers complaining, I believe no one can deny that a PB app, once compiled, is rock solid and lightning fast.

Questions will be answered to the best of my knowledge, memory and availability. You can reach me at webmaster@quadmore.com.

This app is state-of-the-art for Powerbuilder 7, but at the same time, it suffers from the basic limitations of Powerbuilder as it stood at the turn of Y2K:
  • It only supports MAPI for sending email. It does not support CDONTS or CDO. If you have managed to make such code work without resorting to newer versions of Powerbuilder, I would be very interested in seeing how;


  • It's a client-server app using ODBC, rather than the more convenient ADO. ODBC forces you to create a data source in the Control Panel, which requires both administrator privileges if you are using Windows 2000, as well as coding prowess if you are using an installer program. Initially, I created a nice installer program using the Wise product, but it was flawed in that it would not install the data source correctly if the Windows or Winnt root directory was not on the C: drive. For this reason I dropped the installer completely. To install, simply copy the files to a directory, and review the file "Manual ODBC Install.txt";


  • Also because of ODBC, this application is limited to Windows database server machines, although there has been some talk of Linux ODBC interfaces that would be fabulous to get working with Powerbuilder (myODBC and unixODBC);


  • It opens a separate Windows task bar item for each window opened.

On the other hand, what is nice about this project is that I was a bit adventurous. You will find code here to:
  • Send email (like I mentioned before);


  • Open Internet browser windows directly from the app;


  • Call several Windows API functions (for sound, timers, file handling, and opening the HTML help file);


  • Print nested datawindows (this is the feature that should get you all excited);


  • Create an HTML web page dump of a client list with navigation anchors;


  • Allow the creation of new database items through the use of editable dropdown list controls on the main page and the client page (see to-do's concerning these);


  • Round seconds to minutes using different schemes;


  • Center and maximize a window;


  • Obfuscate (should not say encrypt) a password using a simple scheme -- if you are a serious organization don't even think of using this!

JTO was inspired by some Customer Relationship Software I used in the past while doing tech support, as well as a logistics problem my wife Johanne was facing while working for a bank in Vancouver.

To-do's that I don't intend to do but that you could do:
  • When creating a new client using the editable dropdown list controls on the main page, if a "last name comma first name" is entered, parse out the first name and enter it in the appropriate column. Currently the entire entry is inserted in the last name column. This is pretty easy to do, I just plain forgot to do it is all;


  • Create a few reports;


  • Apply the term change for "State" in the client window's menu (forgot that one);


  • When deleting a client, refresh the main window's client dropdown to reflect the change;


  • Change the "Save Settings" and "Clear Settings" buttons in the Audit window to a simple "Remember these settings" checkbox;
I would like to credit Frank Li Pang for the uo_copy_data non visual object. Frank is a venerated west coast Powerbuilder guru, and if you have a job offer and lots of money to spend you can contact him at: franklp@shaw.ca.

Finally, I would like to dedicate this effort to the kind and patient people who taught me everything I know about Powerbuilder, sorted in ascending alphabetical order by last name (Powerbuilder joke): Gord Boisvert, Ivan Brock, Esmond Chow, Venus Ho, Alex Kwong, Frank Pang. And the evil, ruthless testers who kept me on my toes while coding Powerbuilder: Sean Chung, Michael Zuo and Matt Cox.

Bert Szoghy, Ottawa, December 2002


More recent software development projects:



"BabyTalk"

(open source Java text-to-speech desktop app)




"BabyTalk Web"

(open source Java text-to-speech desktop app using Java

Web Services and the Simpletext SQL database)




"Quadmore Java to Microsoft SAPI bridge for Windows "

(free Windows dynamic link library which allows a Sun Java

program to access text-to-speech and speech recognition

functionality provided by the Microsoft Speech API)






Page last modified: April 1, 2004