Contents
UNREGISTERED EVALUATION COPY

YOU MUST REGISTER AFTER USING SLIP DB FOR 30 DAYS.

TO REGISTER SEE THE REGISTRATION FORM

Using SLIP db

Introduction

Installing SLIP db

How do I...

Reference

Commands and menus

Requirements and limits

How costs are calculated

SLIPDB.DAT file format

Copyright and disclaimer

How to register SLIP db


Introduction

What is SLIP DB?

SLIP db is an application for use with a Windows sockets dial-up SLIP connection, such as Trumpet Internationals outstanding "Trumpet Winsock". You call it from your dialing script as part of the login procedure, then call it again when hanging up.

SLIP db records the date and time of each connect and disconnect from your Internet service provider. It calculates elapsed time and figures out a cost based on a per-minute charge. The program has a browse mode that lets see a log of your calls, print a report, and delete records.

SLIP db cost calculations support either one flat rate for all calls, or different rates for calls placed at different times of day.

You can also copy information to the Windows clipboard in a format suitable for pasting into a spreadsheet or word processor for further processing. If you're a programmer, you can easily access the SLIP db database and design programs to meet your own specific needs.


How costs are calculated

SLIP db calculates costs using 1-minute increments. This means a 30-second call is charged the rate for a full minute.

Real elapsed time is used. For example, the charge of a call started at 10:05:15 and ended at 10:06:05 is calculated using 1 minute total connect time.

SLIP db does not support "punch clock" time. With "punch clock" time, a call beginning at 10:05:15, for example, and endinging at 10:06:05 would result in a two-minute charge.

For multiple rates, costs are calculated using the rate in effect at the start of the call. If you cross a rate zone while the call is in progress, the entire cost is calculated using the connect-time rate only.

There almost as many different charge schemes as there are Internet service providers. If SLIP db doesn't support your scheme please send e-mail to the developer - he may be willing to change the software to accommodate it. Select "About" under the "Help" menu in SLIP db for the author's e-mail address.


SLIPDB.DAT File format
SLIPDB.DAT File format (information for programmers)

SLIP db data is stored in a simple "random access" file called SLIPDB.DAT with the following record structure:

Type ConnectDBFType

    Deleted As Integer

    ONTIME As String * 11

    ONDATE As String * 9

    OFFTIME As String * 11

    OFFDATE As String * 9

    ELAPSED As Integer

    COST As Single

End Type

The above record type definition may be used verbatim with MS Visual Basic, MS QuickBasic, and MS-DOS QBasic. It could be translated to C without much trouble.  Click here for an example MS-DOS QBASIC program that demonstrates access to SLIPDB.DAT.

The record structure of SLIPDB.DAT may change in future releases of the program so beware. To prevent damage, it is best that you only write programs that read the database, not write to it.

Warning: SLIP db is not designed for simultaneous access of the DAT file. Having the file open when two programs attempt to access it could damage the file. Load SHARE.EXE on your computer when you are developing programs to access SLIPDB.DAT to prevent this.

If you write a program that uses the SLIP db database, the author of SLIP db would love to know about it. Contact the author through the Internet address given on the "About" box under the "Help" menu.

Undeleting records:

The SLIPDB.DAT file uses the xbase model for deleting records. Records "deleted" from the SLIP db program actually just have the DELETED field set to TRUE (-1) and SLIP db ignores such records. They are not actually erased from the file.

To "recover" deleted records, just set the DELETED field to any value other than  -1.

Database order

SLIP db assumes SLIPDB.DAT is sorted by ONDATE+ONTIME. No attempt is made to sort or index the file yet. If you insert records, make sure they are inserted in the sorted order.

Date format

The date format in SLIPDB.DAT must be in the format DD MMM YY where MMM is a three letter English abbreviation of the month ("JAN", "FEB", "MAR"...)


Requirements and limits

Requirements:

SLIP db requires the use of a dialer program that can run an external program from its dialing script or a Windows batch language that accomplishes the same task.

Known limitations:

This program will probably not work under Windows 3.0.

You cannot run two copies of SLIP db at the same time. For example, if SLIP db is running in browse mode when your dialing script calls it to record a connect time you will get an error message.

Maximum elapsed time between ON and OFF is 9 hours. Maximum records that can be displayed in browse mode is 2000, though the database can hold an unlimited number.

There is no "pack" routine yet to permanently remove deleted records.

Wish list:

Allow rates to be specified in cost per hour as well as cost per minute (note: you can specify up to three decimal places for the rate to almost get around this limit)

Support for changing rates when a rate zone is crossed.

Option to allow "round down" for partial minutes (presently partial minutes are rounded up to count as full minutes)

Different rates for different days of week and holidays

Quarterly billing periods

Support for UK "unit billing" scheme

Summarize previous months in browse. Show detail for current month only.

Option to browse in reverse date order so most recent entry is at the top.

Timer: sound an alarm when crossing into a cheaper rate zone to notify you to hang up then call again to get the cheaper rate.

Timer: alarm when certain cost reached or change background from green through yellow to red as cost increases (!)


Setting charge rates

SLIP db can be set up to calculate charges based on either one flat rate for all calls, or different rates depending on the time a call begins.

Charge rates are set on the setup screen

For example, if your service provider charges the following:

Calls Between:	Cost per minute:
8:00am - 5:59pm	$0.16
6:00pm - 10:59pm	$0.10
11:00pm - 7:59am	$0.08
...the Rates list in the Setup screen should read:

08:00:00 AM	$0.16

06:00:00 PM	$0.10

11:00:00 PM	$0.08

If your service provider has just one flat rate no matter what time of day you call, put one entry in the Rates list using any valid time and the rate charged. For example, if your service provider charges .16 per minute no matter what time of day you call, the Rates list could read:

08:00:00 AM	$0.16

If there is only one rate, you may use any valid time of day.

Some service providers charge by the hour. SLIP db does not yet support hourly rates. However, rates may be entered using up to three decimal places. Dividing the hourly rate by 60 then entering the first three digits after the decimal for "per minute" will give reasonable accuracy.

For exact details on how SLIP db calculates the cost of each call, see How costs are calculated


Installing SLIP db

SLIP db is distributed in compressed form in a ZIP file. You will need a decompression program like PKUNZIP 2.0 or other ZIP 2.0 compatible program to extract the files. The files may be extracted to a temporary directory on your hard disk or to a floppy disk. Once the installation is completed, you can delete the ZIP file and the files in the temporary directory or diskette.

To install SLIP db:

1.	Make sure no Visual Basic programs are running. If you are not sure which of your programs were written in Visual Basic, close everything except Program Manager.

2.	In Program Manager, open the File menu then type the location of the SLIP db files and SETUP. For example:

A:\SETUP

3.	Enter a directory in which to install SLIP db. The directory C:\SLIPDB is a good choice. The installation program will then create the necessary files and add a SLIP db group to Program Manager.

4.	Run SLIP db from Program Manager. A message will appear saying a new database file will be created, then another message will lead you to the setup screen.

On the Setup screen, add and remove times and rates to the list to reflect your service provider's charges. For details on setting rates, click here. There are other optional settings as well. For descriptions of them, see the section the Setup Screen.

Once you have the rates and other options set, click on the Save button then select "Exit" from the "File" menu.

5.	In your login dialing script (LOGIN.CMD for Trumpet Winsock), find the spot where the password and username are entered. On the next line, put in an EXEC, SHELL or RUN command (see the instructions that came with your dialer) to run SLIPDB.EXE with an "ON" parameter. With Trumpet Winsock, for example:

...

input 15 username:

output Kilgore\13

input 10 password:

output TROUT\13

EXEC c:\slipdb\slipdb.exe ON

online

...

Note: Recent versions of Trumpet Winsock beta require quotation marks for the EXEC command, for example: EXEC "c:\slipdb\slipdb.exe ON"

6.	At the end of your logout script file (BYE.CMD for Trumpet Winsock), put in an EXEC, SHELL or RUN command to run SLIPDB.EXE with an "OFF" parameter. With Trumpet Winsock, for example:

...

sleep 2

output +++

sleep 2

output ath0\r

exec c:\slipdb\slipdb.exe OFF

Note: Recent versions of Trumpet Winsock beta require quotation marks for the EXEC command, for example: EXEC "c:\slipdb\slipdb.exe OFF"

That's it! Each time you log in using the dialing script, SLIP db records your computer's date and time. When you use the script to log off, SLIP db again records the date and time then calculates elapsed time and total cost for the session.


EXAMPLE.BAS

' MS-DOS QBASIC program to demonstrate how to access

' the SLIPDB.DAT file structure using qbasic or Visual Basic.

' Distributed as part of SLIP db

' * WARNING * Simultaneous access of SLIPDB.DAT is not supported.

' Writing to the DAT file when SLIP db is running could corrupt the file.

TYPE ConnectDBFType

    Deleted AS INTEGER

    OnTime AS STRING * 11

    OnDate AS STRING * 9

    OffTime AS STRING * 11

    OffDate AS STRING * 9

    Elapsed AS INTEGER

    Cost AS SINGLE

END TYPE

DIM SHARED dbConnect AS ConnectDBFType

DIM SHARED dbHandle AS LONG

dbHandle = FREEFILE

OPEN "slipdb.dat" FOR RANDOM LOCK READ WRITE AS dbHandle LEN = LEN(dbConnect)

TotalRecords = LOF(dbHandle) / LEN(dbConnect)

PRINT "TimeOn"; TAB(14); "DateOn"; TAB(28); "TimeOff"; TAB(42); "DateOff"; TAB(53); "Elapsed"; TAB(63); "Cost"

FOR Scan = 1 TO TotalRecords

    GET dbHandle, Scan, dbConnect

    PRINT dbConnect.OnTime; TAB(14); dbConnect.OnDate; TAB(28); dbConnect.OffTime; TAB(42); dbConnect.OffDate; TAB(53); dbConnect.Elapsed; TAB(63); dbConnect.Cost

NEXT


Changing the date and time format
Changing the date, time & currency formats

SLIP db uses the "Short date" format specified in the "International" setting of your Windows Control panel. Times are displayed using the "Time" format specified there as well. Wherever possible, currency amounts are shown using the "Currency format" setting.

Among other settings, the "International" section of Control Panel allows you to specify:

- Currency symbol

- Decimal symbol

- Thousands separator

- Number of digits after the decimal

See your Windows Manual and the Help file for Control Panel for more information.

To change the way dates, times or currencies are formatted in SLIP db and most other Windows programs:

1.	Exit SLIP db

2.	Run Control Panel and double-click on the "International" icon.

3.	To change date format, select "Change" in the Date box and alter the "Short Date" settings. To change time format, select "Change" in the Time box and alter those settings. To change currency format, select "Change" in the Currency Format box.

4.	Close Control Panel. The next time SLIP db is run, dates and times will be shown using the new format

Note: The above procedure changes the overall default date and time format for Windows and affects all Windows programs, not just SLIP db. See your Windows manual for more information on Control Panel settings

Warning: If you change the currency format to one that uses a comma for the decimal separator, or change from using a comma to a period, manually edit SLIPDB.INI so the values in the [Rates] section use the appropriate separator.


How do I...

The following are common procedures for using SLIP db.

Record times in SLIP db

Display log of calls

Delete an entry

Print entries

Set charge rates

Display the on-screen timer

Display the call summary

Export information to other programs

Write programs to access SLIP db information

Change the date, time or currency formats used by SLIP db

Pay for SLIP db


Copyright and disclaimer

The SLIP db programs are copyright © 1994 by Derrick R. Webber. All rights reserved.

The SLIP db programs are not free. You are permitted to evaluate SLIP db for 30 days. If you decide to use SLIP db after that period, you must to register SLIP db and pay the registration fee. To register, fill out the Registration form

The SLIP db programs are not to be sold or distributed for sale with other programs that are for sale. They are not to be distributed as part of a collection of software without written permission of the author. There is no warranty or claim of fitness or reliability. The programs are distributed as is. The author shall not be held liable for any loss of data, down time, loss of revenue or any other direct or indirect damage caused by these programs.

The runtime modules VBRUN300.DLL, GRID.VBX, CMDIALOG.VBX  and MSAFINX.DLL are copyright © 1987-1993 Microsoft Corp. All rights reserved for them too.

Windows, Visual Basic, QuickBasic are registered trademarks of Microsoft Corporation.


Adding entries to SLIP db

To record date and time of a connection to your SLIP service:

1.	Run SLIP db with the word ON in the command line. For example:

SLIPDB.EXE ON

You can do this by typing the above using the "Run" selection in Program Manager's "File" menu, but usually it is done using an EXEC, RUN or SHELL command from within your SLIP dialler's login script. See the example in the section 4 of Installing SLIP db.

To record date and time of a disconnect (hang up) from your SLIP service:

1.	Run SLIP db with the word OFF in the command line. For example:

SLIPDB.EXE OFF

You can do this by typing the above using the "Run" selection in Program Manager's "File" menu, but usually it is done using an EXEC, RUN or SHELL command from within your SLIP dialler's login script. See the example in the section 5 of Installing SLIP db.

You cannot manually enter dates or times into SLIP db.  SLIP db records the current date and time settings of your computer. For the most accurate results, check your computer's date and time against a trusted time source regularly.


Displaying the log of calls

To display the log of dates, times and costs:

1.	Run SLIP db without the ON or OFF keywords on command line. For example:

SLIPDB.EXE

You can do this by typing the above using the "Run" selection in Program Manager's "File" menu, but usually it is done by adding SLIP db as an icon in Program Manager then double-clicking on the icon.

For information on adding SLIP db as an icon to Program Manager, see your Windows user guide or press F1 when running Program Manager to read the Program Manager help file.


Deleting an entry

To delete any entry in SLIP db:

1.	In the browse screen, position the highlight bar on the row you wish to delete. It does not matter which column the highlight bar is in.

2.	Press the DEL key, or open the "Edit" menu then select "Delete."

Caution: Deleting an entry is permanent.


Exporting to other programs

Entries may be copied to the Windows Clipboard for pasting into other programs.

SLIP db entries are placed on the clipboard with a TAB separating each column. This format is suitable for pasting the information into a spreadsheet like Microsoft Excel or into a word processor.

To export entries to another program:

1.	Click and drag the mouse to select the rows and columns of the information you wish to copy. To select all entries in the entire file, open the "Edit" menu and select "Select All."

2.	Open the Edit menu and select "Copy." The selected rows and columns appear on the Windows clipboard.

3.	Select the destination program and position the cursor where you want the information to appear. Open the program's "Edit" menu and select "Paste."


Printing

SLIP db can print entries to a printer. Entries are summarized by billing period (or month) with a subtotal for each period and grand total for the report. All entries may be printed, or a range of entries can be printed by selecting the rows with the mouse.

To print entries to the printer or to a file:

1.	To print a range of entries, select them by clicking the mouse on the first entry and dragging it to the last. All columns are printed whether they are selected or not.

2.	Open the "File" menu and select "Print." To print just the selected entries, select "Print selection." To print all entries, select "Print All." Select the orientation, paper size and printer then click on "Okay." To print to a binary file, select "Print to file."

Note:	SLIP db uses Arial 10pt to print entries. If this font is not installed or cannot be printed on the selected printer an error message appears. To select a different font, use the Setup screen (See The Setup screen)

To change the day of month used to summarize information on the report, change the "Billing day" option on the Setup Screen.


The Setup Screen

The Setup screen allows you to set the charges your service provider bills, as well as control other options of SLIP db.

The setup screen has the following settings and buttons:

Billing Rates Controls:

Rates

Start time

Cost per minute

Remove

Add

Other options:

Billing day of month

Printer font

Save main window position

Summary at end of call

On-screen timer

3D Dialog boxes

Click on an item above for a description of the corresponding setting on the Setup screen


Rates list

Shows the current time-of-day rate periods and cost per minute. To remove an entry, click on it then select the Remove button. To add an entry, values in the Start Time and Cost Per Minute boxes, then click the Add button. For details on setting rates, click here.


Start time

Enter the begin time of a rate period here. Enter times using 12-hour format (Eg. 2:00pm) or 24-hour format (Eg. 14:00)


Cost per minute

Enter the rate corresponding to the value of Start Time here. Enter rates using decimal values. Examples: 0.16  1.00  .025  Rates may be specified using up to three decimal places.


Remove button

Removes a selected rate and time from the Rates list box. Click on the rate you wish to remove first. SLIP db requires at least one rate.


Add button

Adds the entries typed into the Start Time and Cost Per Minute boxes to the Rates list. Each item added must have a unique Start Time value.


Billing day of month

Used to make SLIP db billing summaries match your service provider's bill. For example, if your service provider bills from the 15th day of each month, enter 15 in the Billing day box. If your bill is for the calendar month, enter 1 in the Billing day box.


Printer font

Allows you to select a different printer font for the printed report.


Save main window position

Click on this selector to preserve the current on-screen location of the SLIP db main window. SLIP db will appear in that position the next time you run it. To have the window appear in another position, move the window, open Setup and click on Save Window Position again.


On Screen Timer

Select this option to have a small timer appear on the screen during each call. The timer displays elapsed time and cost so far. For details, click here.


Summary at end of call

Select this option to have a summary screen appear at the end of each call. The summary screen displays total time of the call, cost, and cost for the billing period.


On Screen Timer

A simple elapsed timer program called SLIPTIME is included with SLIP db. The timer can be displayed during each call. It shows elapsed connect time and estimated cost so far.

To enable the timer, select the option "On screen timer" on the Setup Screen.

The timer remembers where you put it on the screen; move it to a convenient location and it will appear there each time.

To display a menu of options for the timer, click anywhere on the clock face. One option is "always on top", which prevents the timer from being covered by other windows.

The timer can be minimized to an icon showing connect time and cost so far. When minimized, the icon will stay on top of all other windows if the Always on top item is checked in the timer menu (see above). To access the timer menu, double click on the icon to restore it to full size or click once on the icon then select Restore from the menu.

Note: When the timer is minimized, there is not enough room to display hours minutes and seconds at once, so the following trick is used: if elapsed time is under one hour, the icon displays elapsed minutes and seconds. When elapsed time reaches one hour or more, the seconds are dropped and only hours and minutes are displayed. Of course, seconds are still kept track of for use in calculating costs- they are just not displayed in the icon.


Commands and Menus

Click on an item below for a description of the menu item:

File menu:

Setup

Print

Exit

Edit menu:

Copy

Delete

Select all

Help menu:

Contents...

Search for help on...

About...


Setup

Displays the Setup Screen used to set various program options.


Print

Prints a report of entries to a printer. See Printing


Exit

Terminates SLIP db. You may also terminate the program by double-clicking the control box on the upper left corner of the SLIP db window.


Delete

Erases the currently selected entry from the database. See Deleting an entry


Copy

Copies the selected rows and columns to the clipboard. See Exporting to other programs


Select all

Selects all rows and columns in the database. Use this to copy all information to the Windows clipboard.


Contents

Displays the index of this help file. Same as pressing the Contents button when Help is active.


Search for help on...

Displays a dialog box to search this help file for key words. Same as pressing the Search button when Help is active.


About...

Displays version, copyright, and author information about SLIP db.


Displaying the summary screen

A summary screen may be displayed at the end of each call. It displays total time of the call, cost, and total cost for the billing period.

To enable the summary screen, select the option "Summary screen" on the Setup screen


How to register SLIP db

SLIP db is not placed into the public domain. It is Copyright © 1994 Derrick R. Webber. For more information, see the Copyright and disclaimer

SLIP db is not free. You are granted a limited license to evaluate SLIP db for 30 days. If you continue using SLIP db after that period, you are required to register your copy and pay the registration fee.

This is the SHAREWARE concept- try before you buy. Software distributed as shareware allows you to make sure the product meets your needs before giving up any hard earned money. Shareware means you dont get stuck paying for useless software while allowing the software author to keep costs low and distribute updates rapidly.

When you register SLIP db, you will be e-mailed the latest version of the program free from all registration reminders personalized with your name and company name

License to use SLIP db costs CDN$30.00 per computer. (On Sept 11 1994, CDN$30.00 equaled approximately US$21.88). Site discounts for multiple licenses are also available: contact the author.

To register SLIP db please use the following form:

SLIP db REGISTRATION FORM

Please send ____ registered copies of SLIP db @ CDN$30.00 per copy to:

Your Name:	____________________________________

Company name:	____________________________________

Street:	____________________________________

City:	____________________________________

Postal Code/ZIP:	____________________________________

Country:	____________________________________

Internet email address:	____________________________________

Binary file format to use when sending the registered version of SLIP db to the above Internet e-mail address: Preferred Binary format:	(  ) Binhex	(  ) MIME	(  ) UUENCODE

Quantity	Unit Price	Subtotal
_______	x $30.00 (Canadian) =	_________
New Brunswick residents add 11% PST	_________
Total enclosed (Canadian funds)	_________
Send the above information with the registration fee to in the form of international money order or cheque in Canadian funds to:

Derrick Webber Technical Services

116 Brunswick Street Suite 2

Fredericton, NB  E3B 1G6

CANADA

When your registration is received and payment verified you will be e-mailed a personalized edition of SLIP db with all registration reminders removed. Your name will also be added to the SLIP db mailing list providing you with advance notice of updates, bugs fixes, and announcements concerning SLIP db.


3D Dialog boxes

Enable this option to display dialog boxes and messages with a "3D" appearance. Normally this option can be enabled. However, on some computers it may cause general protection faults. If you experience errors with SLIP db after enabling this option, disable it.