mSQL ODBC-driver for Sibyl

Intro

In this text I will descripe how to connect mSQL database with Sibyl

Sibyl is a object pascal programming environment for OS/2 which ide and functionality is very similar compared to Borland's Delphi. Biggest difference is that Delphi will work under Windows and Sibyl will work under OS/2.

Sibyl is designed to work with various database systems supposing there is just an ODBC-driver available. However, unlike in Delphi, no database-system is included with Sibyl and instead one have to buy them separately. These commersial alternatives like "DB/2" and "SQL Anywhere" are unfortunately quite expensive. If you search cheap alternative for database access, there luckily exist mSQL2. mSQL2 is freely downloadable database system suitable at least for maintaining small databases. Unfortunately, earlier there has not been available mSQL ODBC-driver which will work with Sibyl. Thanks to the work started by Jin, Ke and Dirk Ohme with iODBC-drivers I have been able to fix that problem and write mSQL ODBC-driver which will work with Sibyl. This driver is still in beta, but is freely downloadable in the end of this text.

I will now descripe in details how to use Sibyl with mSQL.

I)Installing mSQL-ODBC-driver for Sibyl
II)Info considering mSQL2 ODBC-drivers and mSQL2
III)Making test-project with Sibyl
IV)Reporting from Bugs

I) Installing mSQL-ODBC-drivers for Sibyl
  • Download msqlodbc.zip from my homepage into temporeraly directory
  • Extract msqlodbc.zip by using either unzip or pkunzip
  • Copy extracted msqlodbc.dll into some directory which is in libpath in config.sys
  • Open "Database driver setup"-program from your "SIBYL"-folder and add msqlodbc.dll in the list of odbc-drivers. (add it without directory-path)


II) Info considering mSQL2 ODBC-drivers and mSQL2
  • mSQL2 support most of the standart SQL-command.VIEWS and TRANSACTIONS are however not supported.
  • Sibyl use both VIEWS and TRANSACTIONS when accessing database system through odbc-driver.
  • For avoiding conflict represented above I've made small layer inside odbc-driver. This layer investigates all SQL-commands and modificates them when nescessary before passing to the mSQL-server.
III) Making test-project with Sibyl
  • Create new table with mSQL and add some data into it
  • Create new project with Sibyl
  • Add TTABLE-,TDATASOURCE- and TDBGRID-components into the main form of your Sibyl project
  • Select TDATASOURCE-component and activate 'OBJECT INSPECTOR'
  • Change propery 'DataSource' in OBJECT INSPECTOR to point TTABLE-component in your form
  • Select TTABLE-component and change properties Server, DataBase and TableName in "OBJECT INSPECTOR"
  • Finally set Active property of TTABLE-component to TRUE
  • Select TDBGRID-component and set DataSource-property
  • Now you should see the context of your table created in mSQL
IV) Reporting from Bugs
If you find bugs or have some quetions or suggestions, be free to contact me. Here is the info how to contact me!