EVENTS -- ODBC Sample

Events illustrates the use of date and time fields using ODBC from Prolog.

It also illustrates the use of directives to create the runtime environment for the application, instead of amzi.cfg to load 'aodbc.lsx' and the linker to load 'aodbc.plm'.

To run it you need to first:

  1. Make sure ODBC 2.0 or later is installed. (This is usually found in your Control Panel, sometimes under Administrative Tools. Later versions of Windows disable the Administrative Tools by default and you need to change the flag.)
  2. Create adata source named 'events' defined in your 32-bit ODBC administrator (in the Control Panel) that uses the events.mdb database included with this demo.

To run it:

?- consult(events).
yes

?- main.
?- consult(events).

yes
?- main.
Duke:Clemson date(1997, 1, 12) time(14, 30, 0)
Florida State:Georgia Tech date(1997, 1, 12) time(20, 15, 0)
Maryland:North Carolina date(1997, 1, 14) time(13, 0, 0)
NC State:Virginia date(1997, 1, 14) time(14, 0, 0)
Wake Forest:Duke date(1997, 1, 14) time(19, 0, 0)
Clemson:Florida State date(1997, 1, 17) time(15, 0, 0)
Georgia Tech:Maryland date(1997, 1, 18) time(20, 0, 0)
North Carolina:NC State date(1997, 1, 18) time(14, 15, 0)
Virginia:Wake Forest date(1997, 1, 18) time(14, 0, 0)

yes

Copyright ©1987-2004 Amzi! inc. All Rights Reserved. Amzi! is a registered trademark and Logic Server and e-Prolog are trademarks of Amzi! inc.