OdbcTestX ActiveX Component

The ODBCTESTX ActiveX component allows you to perform simple ODBC related functions from a program without having to include the Microsoft DAO interface (large and full of features you may not need) or having to code direct calls to the ODBC API (complex and error-prone ). The component only runs under 32-bit Windows (NT or Win95). The component allows you to:

 However, You should not use the ODBCTESTX component if you plan to:

The ODBCTESTX ActiveX component can be called from any language that supports ActiveX. This includes Visual C++ and Visual Basic, Delphi, HTML script languages, Internet pages, Java and Centura Team Developer, but many others should work as well. Please note that:


Installing the component
The raison d'être for the component
Version overview
Using the Component in Your Programs
Sample Visual Basic Program
Reference to Attributes and Methods
ODBC Data Types
Software from ISS Data

Installing the component

Execute the Install.exe file. It installs the component into your Windows system directory and correctly updates your registry. The installation process allows you to choose an install directory where the documentation and some Visual Basic sample programs are placed. If you do not have Visual Basic installed on your system you should choose the minimal installation option to avoid having the VB samples copied to your disk.

You can uninstall the component by entering Add/Remove programs icon in the Control Panel, choosing the component and clicking Add/remove .

The raison d'être for the component

Why write an ActiveX component that simply allows you to issue basic SQL commands against ODBC data sources? The world is filled with fancy ODBC enabled components and a part from that most modern programming languages have advanced ODBC interfaces (like the DAO interface in Visual Basic and C++). To add one more component to the pile may seem like inventing the wheel again just for the fun of it, so a few words of explanation from the author may be in order:

To my experience all those fancy components and advanced interfaces have a common failing - They try to do all things to all people. Well, I am a simple guy; I just want to do simple things to my database. I get thoroughly annoyed when I have to use my time figuring out the intricacies of DAO, when all I want is two or three simple functions to access my ODBC database.

So here is a simple component that does what's needed and not much more. The component is written for the Windows platform as an ActiveX component in C++. It is reasonably small and efficient, and due to the ActiveX interface it can be called from almost any modern programming language.

I hope you will use the component to make some great programs. We have placed the component on the Internet as freeware. The only payment we want for the component is that you mention ISS Data and the author in your application's About Dialog and in your application's documentation.

Good luck,

Jorgen Grosbol,
ISS Data,
email
: jorgengros@cybernet.dk

Version overview


Version 1.0 (and 1.1) (autumn 1997)
Version 1.2 (January 1998)

Version 1.0 (and 1.1) (autumn 1997)

This is the original version of the component to be placed on the Internet.

Version 1.2 (January 1998)

This version contains all the functionality of the original component with the following additions:

Using the Component in Your Programs

To use the component you have to register it in the Windows registry and you have to place some DLL and OCX files in the Windows System directory . The install program does this for you, but if you include the component in your own applications you have to install it on the target systems where your program will be executed. You can do this by simply including the INSTALL.EXE file with your installation and have your users execute it before using your own application, or you can have your own installation program place the correct files in the users system. If you choose the latter option you need the information below:

  1. You must place the following files in the Windows\System directory:

    ODBCTESTX.OCX
    MFC42.DLL
    MSVCRT.DLL

    If you plan to use the Visual Basic Setup Wizard you will also need the dependencies file OdbcTestX.DEP that the install program has placed in your windows system directory.
  2. You must register the component with the system. The component is self-registering, so most installation programs (like InstallShield) will do this for you. You may want to use the Type Library supplied in the installation directory ( OdbcTestX.tlb), or you can use the Microsoft sample program RegSvr32.exe to register the component.

Sample Visual Basic Program

If you have Visual Basic installed on your system you may want to look at the sample program supplied in the installation directory. The program consists of a single form that allows you to activate different OdbcTestX functions. Below is a short description of how you would use the component to perform some simple tasks from Visual Basic. While syntactically different most other languages will conform to the same general logic as shown in the examples, so you should be able to use the guide even if your language of choice is not Visual Basic.


Accessing the component from Visual Basic
Listing all available ODBC data sources
Controlling Commit and Rollback
Connecting to an ODBC Data Source
Issuing an SQL command
Getting the names of the fetched columns
Reading the fetched data rows
Translating text columns
Finding all tables in a data source
Finding all columns in a table

Accessing the component from Visual Basic

To use the component in a Visual Basic program you have to do the following:

  1. Check the component in the list of available components in the component list in the Project menu. This will place a small icon representing the component in the toolbox.
  2. Place at least one copy of the component in some form in your project. The component is invisible at runtime, so you can place it anywhere you want. Give it a name of your choosing. In the sample program the default name ( OdbcTestX1 ) has been used.

Listing all available ODBC data sources

Use the GetSourceNames method to get a list of all available ODBC data sources in the system. The argument defines a string that is placed between each information in the returned list. You can then use program statements to break the list into its parts. The example below demonstrates how you can put the name and description of each data source in a list box:

   Dim names As String, delim As String
   Dim i As Integer, descr As String, source As String
   delim = "++"
   List1.Clear
   names = OdbcTestX1.GetSourceNames(delim)
   i = InStr(names, delim)
   While i > 0
     source = Mid(names, 1, i - 1)
     names = Mid(names, i + 2)
     i = InStr(names, delim)
     descr = Mid(names, 1, i - 1)
     names = Mid(names, i + 2)
     List1.AddItem source & " - " & descr
     i = InStr(names, delim)
   Wend

Controlling Commit and Rollback

Before you open the ODBC data source you should decide whether you want to use auto-commit or not. The default is that the AutoCommit attribute is turned off ( false). Please consider that

  1. If AutoCommit is set to true then all successful SQL statements will be immediately committed to the database system. This effectively prevents you from issuing RollBack commands later to undo your changes.
  2. If AutoCommit is set to false you have to issue Commit and RollBack commands yourself to commit changes to the database system. If you do not yourself issue these commands a single commit will be issued when you disconnect from the ODBC data source.

Please note that some ODBC drivers may have external parameters that determine their mode of operation.

Connecting to an ODBC Data Source

 You connect to an ODBC data source by specifying the source name, user id and password to the component and then issuing the Connect method:

OdbcTestX1.source = "SourceName"
OdbcTestX1.Userid = "Userid"
OdbcTestX1.Password = "Password"
OdbcTestX1.AutoCommit = True
emsg = OdbcTestX1.Connect
If emsg = "OK" Then
  MsgBox "Connected"
Else
  MsgBox "Error: " & emsg
End If

You can only open one data source at a given time in each component, but you can add as many OdbcTextX components to your project as you like.

Issuing an SQL command

Once you have connected to a data source you can issue SQL commands to it. Use the ExecuteSql command to perform SQL commands:

Dim emsg As String, command as String
command = "SELECT * FROM CREATOR.MYTABLE"
emsg = OdbcTestX1.ExecuteSql(command)

Afterwards the emsg variable will either contain the text "OK" or an ODBC error message. If you issue an SQL SELECT statement (as in the example above) you can use the Fetch and ColumnValue functions to retrieve the actual data in the fetched table.

Getting the names of the fetched columns

 When you have issued a SELECT command you can query the number of returned columns and their names like this:

Dim colcount as Long, colname as String, colnumber as long
colcount = OdbcTestX1.ColumnCount
If colcount < 1 Then Exit Sub ' no result set found, exit here
For colnumber = 1 To colcount
  colname = OdbcTestX1.ColumnName(colnumber)
  ' use the column name in colname for something ...
Next colnumber

There are also other attributes that allow you to get column information. These include:

OdbcTestX1.ColumnName(colnumber)
OdbcTestX1.ColumnType(colnumber)
OdbcTestX1.ColumnLength(colnumber)
OdbcTestX1.ColumnPrecision(colnumber)
OdbcTestX1.ColumnScale(colnumber)
OdbcTestX1.ColumnIsNullable(colnumber)

Reading the fetched data rows

 You issue SQL SELECT statements to build result sets. These Result sets can be read one row at a time with the Fetch method and the data value in each column in the row can be retrieved with the ColumnValue attribute. It could look something like this:

   Dim colcount as Long, colnumber as Long
   Dim dataline as String, colvalue as String, emsg as String
   colcount = OdbcTestX1.ColumnCount
   While OdbcTestX1.Fetch(emsg)
     dataline = " "
     For colnumber = 1 To colcount
       If OdbcTestX1.IsNull(colnumber) Then
         colvalue = "[NULL]"
       Else
         colvalue = OdbcTestX1.ColumnValue(colnumber)
       End If
       dataline = dataline & colvalue & "; "
     Next colnumber
     List1.AddItem dataline
   Wend
   If emsg <> "OK" Then List1.AddItem "Error: " & emsg

Translating text columns

You can have the OdbcTestX component translate the character of text columns being read. This is done by issuing a SetTranslateTable method just before the ColumnValue is referenced. The translate table stays in effect until you define another table by a call to SetTranslateTable. The first argument defines the characters you want OdbcTExtX to translate, the second argument defines what characters you want them translated into. The example below is identical to the previous example except that all character columns have the character '#' translated into the Danish national character 'Æ'. Also '@' in translated into 'Ø' and '$' is translated into 'Å'.

   Dim colcount as Long, colnumber as Long
   Dim dataline as String, colvalue as String, emsg as String
   colcount = OdbcTestX1.ColumnCount

OdbcTestX1.SetTranslateTable "#@$", "ÆØÅ" While OdbcTestX1.Fetch(emsg) dataline = " " For colnumber = 1 To colcount If OdbcTestX1.IsNull(colnumber) Then colvalue = "[NULL]" Else colvalue = OdbcTestX1.ColumnValue(colnumber) End If dataline = dataline & colvalue & "; " Next colnumber List1.AddItem dataline Wend If emsg <> "OK" Then List1.AddItem "Error: " & emsg

Finding all tables in a data source

The SelectTableNames method creates a result set containing the names of all the tables in the currently connected ODBC data source. The method has some arguments that allow you to limit the number of returned table names (which can be practical when accessing mainframe databases where the number of tables may be quite large). You use the SelectTableNames method like this:

   Dim emsg as String, qualifier_mask as String
   Dim creator_mask as string, table_mask as String
   qualifier_mask = ""
   creator_mask = "DAP%"
   table_mask = "TB%"
   emsg = OdbcTestX1.SelectTableNames(qualifier_mask, _
          creator_mask, table_mask, 0)
   If emsg <> "OK" Then
     MsgBox "Error: " & emsg
     Exit Sub
   End If

You read the actual table names from the result set as you would any other result set, i.e. with Fetch and ColumnValue commands. See the description of the SelectTableNames method for details on the format of the returned table.

Finding all columns in a table

 The SelectColumnNames method creates a result set containing the names of all columns in the tables in the currently connected ODBC data source. The method has some arguments that allow you to limit the number of returned column. You would typically only want to get the column names for one table in each call of the method. You use the SelectColumnNames method like this:

   Dim emsg as String, qualifier_mask as String
   Dim creator_mask as string, table_mask as String
   qualifier_mask = ""
   creator_mask = "DAPZ1"
   table_mask = "TBUSERNAMES"
   emsg = OdbcTestX1.SelectColumnNames(qualifier_mask, _
          creator_mask, table_mask, "")
   If emsg <> "OK" Then
     MsgBox "Error: " & emsg
     Exit Sub
   End If

You read the actual table names from the result set as you would any other result set, i.e. with Fetch and ColumnValue commands. See the description of the SelectColumnNames method for details on the format of the returned table.

Reference to Attributes and Methods

Below is a list of all attributes and methods available in the ODBCTESTX component. Some entry points exist in two versions. The version suffixed with 'S' is internally simpler and may work in certain 3rd party software packages that do not support the dual-interface mechanism used in the non-S version.


String Author
String Copyright
String Version
String Compiled
String Email
String UserParm
String Source
String UserId
String Password
String GetSourceNames(String Delimiter)
Boolean AutoCommit
Commit
RollBack
Long MaxVarcharSize
String Connect
Boolean Disconnect
String ExecuteSql(String SqlCommand)
Boolean Fetch(String ErrorMessage) or String FetchS()
Long ColumnCount
Long RowCount
String ColumnName (Long ColumnNumber )
Long ColumnType(Long ColumnNumber )
Long ColumnLength(Long ColumnNumber )
Long ColumnPrecision(Long ColumnNumber )
Long ColumnScale(Long ColumnNumber )
Boolean ColumnIsNullable(Long ColumnNumber )
String ColumnValue (Long ColumnNumber)
Boolean IsNull(Long ColumnNumber )
String SelectTableNames(String QualifierMask, String CreatorMask, String TableMask, Long Types)
SetTranslateTable (String FromLetters,String ToLetters)
String SelectColumnNames(String QualifierMask, String CreatorMask, String TableMask, String ColumnMask)

String Author

String attribute. Returns a string variable containing the name of the author of the component. This attribute cannot be set.

String Copyright

String attribute. Returns a string variable containing a copyright message for the component. This attribute cannot be set.

String Version

String attribute. Returns a string variable containing the current version number of the component. This attribute cannot be set.

String Compiled

String attribute. Returns a string variable containing the date when the component was last compiled. This attribute cannot be set.

String Email

String attribute. Returns a string variable containing the e-mail address of the author of the component. This attribute cannot be set.

String UserParm

String attribute. This text value is not used by the component. You can use it to store and retrieve any relevant text information. One typical use could be to place a user-friendly name for the data source here.

String Source

String attribute. Contains the ODBC Data source name used when connecting to ODBC. You must set this attribute before connection or issuing other database access commands. You can set this property in design-mode, but due to source name variations on different systems it is probably a better idea to set it dynamically during program execution.

String UserId

String attribute. Contains the user id used when connecting to the ODBC data source. You should set this attribute before connection or issuing other database access commands to avoid having the user prompted for passwords by the ODBC driver.

String Password

String attribute. Contains the password used when connecting to the ODBC data source. You should set this attribute before connection or issuing other database access commands to avoid having the user prompted for passwords by the ODBC driver. Be aware that if you save this property in your project the password will be saved in un-coded form. For this reason you may want to supply the password yourself during runtime.

String GetSourceNames(String Delimiter)

String Method. Returns a string containing all available ODBC data source names and descriptions in the system. Each data source results in the following being added to the result string:

SourceName XXX SourceDescription XXX

where XXX is the string specified in the Delimiter parameter. See the coding example in the sample program.

Boolean AutoCommit

Boolean attribute. Set this attribute before opening a connection. If set to true all SQL commands are automatically committed to the database system. If set to false you have to issue the Commit or RollBack commands yourself.

Commit

Method. Performs a commit against the database system currently connected to. Alternatively you may want to use the AutoCommit option to automatically commit each SQL statement to the database system.

RollBack

Method. Performs a rollback against the database system currently connected to. If you want to perform RollBack commands you should ensure that the AutoCommit option is set to false.

Long MaxVarcharSize

Long integer attribute. Defines the maximum size of long varying fields processed by the component. Longer fields will be truncated. The default value is 32000 bytes.

String Connect

Method returning a string. Performs a connect to the ODBC data source specified in the Source option using the user id and password set in the UserID and Password options. The method returns a string that is either "OK" (if the connection was achieved) or an ODBC error message (if an error occurred).

Boolean Disconnect

Method returning a Boolean value. Disconnects from the currently connected to ODBC data source. The return value is true if a disconnection was performed and false if no connection existed to disconnect.

String ExecuteSql(String SqlCommand)

Method returning a string. Executes the SQL statement specified in the SqlCommand argument. You must have successfully connected to a data source before you can execute SQL statements. The return value is either "OK" (if everything went well) or an ODBC error message (in case of failure).

Boolean Fetch(String ErrorMessage) or String FetchS()

These methods fetch the next row from the current result set. The first method returns true if more rows remained and false if end-of-file were encountered. The ErrorMessage string is an output parameter. It is set to "OK" if no ODBC errors occurred and to an ODBC error message or "EOT" (end of table) otherwise. The second method (FetchS) simply returns the error message - You can compare the message to "OK" to see if a row was fetched.

Long ColumnCount

Long integer attribute. Contains the number of columns in the current result set from the last executed SQL command or SelectTableNames or SelectColumnNames command. This attribute cannot be set.

Long RowCount

Long integer attribute. Contains the current number of rows in the result set resulting from the last executed SQL command or SelectTableNames or SelectColumnNames command. If the driver does not support this function a value of -1 is returned. This attribute cannot be set.

Note - not all database systems support this attribute for all functions. While most systems return the number of deleted rows here after an SQL DELETE request, only a few will return the number of rows in the result set from a SELECT command. You will have to try out each command to find out whether your database system supports this attribute or not.

String ColumnName (Long ColumnNumber)

String attribute. Contains the name of the column having the given number in the current result set from the last executed SQL command or SelectTableNames or SelectColumnNames command. This attribute cannot be set. Columns are numbered starting with one (1).

Long ColumnType(Long ColumnNumber)

Long integer attribute. Contains the type of the column having the given number in the current result set from the last executed SQL command or SelectTableNames or SelectColumnNames command. This attribute cannot be set. Columns are numbered starting with one (1).

Long ColumnLength(Long ColumnNumber)

Long integer attribute. Contains the length of the column having the given number in the current result set from the last executed SQL command or SelectTableNames or SelectColumnNames command. This attribute cannot be set. Columns are numbered starting with one (1).

Long ColumnPrecision(Long ColumnNumber)

Long integer attribute. Contains the precision of the column having the given number in the current result set from the last executed SQL command or SelectTableNames or SelectColumnNames command. This attribute cannot be set. Columns are numbered starting with one (1).

Long ColumnScale(Long ColumnNumber)

Long integer attribute. Contains the scale value of the column having the given number in the current result set from the last executed SQL command or SelectTableNames or SelectColumnNames command. This attribute cannot be set. Columns are numbered starting with one (1).

Boolean ColumnIsNullable(Long ColumnNumber)

Boolean value attribute. Contains True if the column having the given number in the current result set from the last executed SQL command or SelectTableNames or SelectColumnNames command can contain NULL values and False otherwise. This attribute cannot be set. Columns are numbered starting with one (1).

String ColumnValue (Long ColumnNumber)

String attribute. Contains the value of the specified column in the current row in the current result set. Non-character columns are converted to character format if possible. This attribute cannot be set. Columns are numbered starting with one (1).

Boolean IsNull(Long ColumnNumber)

Boolean attribute. Contains true if the value of the specified column in the current row in the current result set has a NULL value and false otherwise. This attribute cannot be set. Columns are numbered starting with one (1).

String SelectTableNames(String QualifierMask, String CreatorMask, String TableMask, Long Types)

Method returning a string. Places a table containing the list of all objects (views, tables, synonyms...) in the ODBC data source fitting the specified masks. The masks variables can be empty (includes all objects), or can hold SQL mask characters like '%' (percent sign). Note that not all ODBC drivers support mask characters. Also note that some systems compare names in a case-dependent way. The Types parameter is an integer value specifying:

 0 = all types
 1 = tables
 2 = views
 4 = system tables
 8 = aliases
16 = synonyms

You can add the values to get more than one type of object returned in one call.

You have to connect to the data source before the SelectTableNames method can be executed. You can read the result set row by row using the Fetch method and you can get the actual information using the ColumnValue () property. The table returned contains the following columns:

1: TABLE_QUALIFIER
2: TABLE_OWNER
3: TABLE_NAME
4: TABLE_TYPE
5: REMARKS

The returned string is either "OK" (if everything worked out) or an ODBC error message (in case of failure).

SetTranslateTable (String FromLetters,String ToLetters)

This method defines the translation that will take place each time you use the ColumnValue method to get the value of a string column. Each letter in the first argument string is translated into the corresponding letter in the second argument string. The translation takes place when you call ColumnValue , so you can dynamically change the translate-table even after you have retrieved some of the columns of a row. Each call to SetTranslateTable completely removes the previous translate-table, so you have to specify all letters to be translated in the same function call.

Note: Characters are not translated when storing data in the database using INSERT or UPDATE SQL statements. Also note that only columns of type 1 (CHAR) and 12 (VARCHAR) are translated when ColumnValue is called.

String SelectColumnNames(String QualifierMask, String CreatorMask, String TableMask, String ColumnMask)

Method returning a string. Places a table containing the list of columns in all objects (views and tables) in the ODBC data source fitting the specified masks. The masks variables can be empty (includes all objects), or can hold SQL mask characters like '%' (percent sign). Note that not all ODBC drivers support mask characters. Also note that some systems compare names in a case-dependent way. You have to connect to the data source before the SelectColumnNames method can be executed. You can read the result set row by row using the Fetch method and you can get the actual information using the ColumnValue () property. The table returned contains the following columns:

1: TABLE_QUALIFIER
2: TABLE_OWNER
3: TABLE_NAME
4: COLUMN_NAME
5: DATA_TYPE
6: TYPE_NAME
7: PRECISION
8: LENGTH
9: SCALE
10: RADIX
11: NULLABLE
12: REMARKS

See the paragraph on ODBC Data Types for how to interpret the DATA_TYPE column.

ODBC Data Types

Internally ODBC uses an integer value to define the data format of a column in a table. These numbers can be found in the ODBC systems documentation, but for your convenience the list below gives the more common data type numbers:

UNKNOWN_TYPE   0
CHAR           1
NUMERIC        2
DECIMAL        3
INTEGER        4
SMALLINT       5
FLOAT          6
REAL           7
DOUBLE         8
DATETIME       9
TIME          10
TIMESTAMP     11
VARCHAR       12
LONGVARCHAR   -1
BINARY        -2
VARBINARY     -3
LONGVARBINARY -4
BIGINT        -5
TINYINT       -6

The formats above are used by ODBCTESTX internally, but generally you do not have to know the data type of your to retrieve them as the component converts data to character format where possible.

Beware that the actual data format used in the database system can vary from the format used by ODBC, so you will not always be able to guess the data type even if you know the format of the original column in the table.

 

Software from ISS Data

ISS Data A/S is a subsidiary of ISS Scandinavia, the Scandinavian division of the largest multinational cleaning services company in the world: ISS-International Service System A/S (see: http://www.iss.dk). While our main task at ISS Data is to provide a wide variety of IT services mainly to the Scandinavian ISS companies, we also provide IT services to external customers. Within these services we also perform program development for both internal and external customers.

The program development efforts have resulted in products that we have found can be of great interest to a larger group of companies and individuals than our native group of customers. We have therefore decided to provide these programs as shareware and freeware through the Internet and CompuServe. Since providing these software products in that form is not our main line of business we cannot guarantee support for our shareware and freeware offerings, but we do try to fix bugs and upgrade our products if possible. In recognition of the limited support we also try to keep our shareware prices low. The freeware offerings are mostly products created for internal use that have proved popular and functional in our own environment. We have been making this kind of software for a period of more than 10 years, and we are pleased that the advent of the Internet has made it possible for us to share our programs with a larger audience.

Below is a list of our current freeware and shareware offerings with a short description and some references to download-sites, should you want to try them out.


ODBCCOPY - data copying and replication (shareware)
ODBCTEST - issue SQL to ODBC compatible databases (freeware)
ODBCTESTX - ActiveX interface component to ODBC (freeware)
DTRACKER - Track ODBC database up-time (freeware)
Centura Software related software

ODBCCOPY - data copying and replication (shareware)

An ODBC based utility for Windows that allows you synchronize tables in the same or different databases. A timer lets you perform the replication operation automatically at certain intervals (e.g. daily, weekly, etc.). The program exists in a 16-bit and a 32-bit version. The shareware version is limited in that a dialog will ask you if you want to continue each time the program has processed 25 rows of data. The system is script based, but an interactive editor makes it easy to create and maintain scripts.

Internet downloads from:

http://www.simtel.net/simtel.net/win95/database.html
http://www.simtel.net/simtel.net/win3/database.html

CompuServe downloads from:

GO WINSHARE, LIBRARY 18 download IDODBC16.EXE or IDODBC32.EXE

 

ODBCTEST - issue SQL to ODBC compatible databases (freeware)

A small and very useful Windows utility that allows you to test connections to ODBC data sources and lets you issue SQL to them. It also allows you to list tables and columns in the data source and lets you generate generic SELECT and CREATE SQL commands. When errors occur it shows you the original ODBC error messages. Exists in both a 16-bit and a 32-bit version.

Internet downloads from:

http://www.simtel.net/simtel.net/win95/database.html
http://www.simtel.net/simtel.net/win3/database.html

CompuServe downloads from:

GO GUPTA, LIBRARY 8 download ODBCTEST.ZIP

 

ODBCTESTX - ActiveX interface component to ODBC (freeware)

General ActiveX component that can be used from most 32-bit Windows languages like C++, Visual Basic, Delphi, HTML and J++. Allows easy database access via ODBC without having to understand or include the larger (and more powerful) database interface engines like DAO. It lets you list ODBC source names, extract table and column information, Commit, Rollback, select and fetch data one row at a time, and generally perform all actions available in SQL. Does not support host variables, data bound controls or program-controlled cursors.

Internet downloads from:

http://www.simtel.net/simtel.net/win95/database.html

CompuServe downloads from:

GO GUPTA, LIBRARY 8, search on keyword ODBC

 

DTRACKER - Track ODBC database up-time (freeware)

Small Windows 95 or NT program meant to execute in the background on servers or workstations. It periodically connects to a database and tries to execute some SQL statement. The result (OK or ODBC error message) is logged in a text file for later analyses. It can also execute in the foreground where it turns from green to red when a failure in the connection is detected.

Internet downloads from:

http://www.simtel.net/simtel.net/win95/database.html

CompuServe downloads from:

GO GUPTA, LIBRARY 8, download DTRACKER.ZIP

 

Centura Software related software

The following is a list of ISS Data A/S contributions specially related to Centura Software. They can all be found in the Centura Forum at Compuserve, GO GUPTA. Note that for the sample applications Centura runtime components are required.

SBCAPI.ZIP - SQLBase c/api - unload - load - reorganize (freeware)

SQLBase >= 6.x only. C/API for UNLOAD, LOAD & REORGANIZE. This is ver. 1.04, now contain both 16 and 32 bit version. VT.APL required. Content of file is SBCAPI16.APT, SBCAPI16.TXT, SBCAPI32.APT, SBCAPI32.DOC. NOTE: .APT format for smallest .ZIP size.

DEMOBOX.ZIP - List- and combobox return index example (freeware)

DEMOBOX show how to return index from list- & combobox = user friendly look and developer friendly behavior. It even work the other way around, by referencing the index you can make the box move. OO-stuff, simply drop box and datafield on your form after you have picked it from the tool-palette. It is written in SQLWindows 5.03, but as it is SAL only, it will do in CTD too. Content of .ZIP is DEMOBOX.APT, DEMOBOX.APL, DEMOBOX.TXT, COMPANY.SQL Note: .APT format for smallest .ZIP size = fast download.

DIGGER.ZIP - Sample Data Navigator (freeware)

Sample application that show "drill down" in a company organization chart by assigning a calculated key to each node. File include DIGGER.WRI, DIGGER.SQL, DIGGER.APT and 4 .BMP files. It is written in SAL only, so it will do in both SW & CTD. Load DIGGER.SQL into DIGGER.DBS before you launch DIGGER.APT. Target of DIGGER is reporting systems where data is recalculated, ie. Data Warehouse, EIS and DSS systems, .APT format is used for smallest .ZIP size = fast download.

QGOCX.ZIP - Graph using BPS GRAPH32.OCX (freeware)

CTD 1.1.1 sample that show how to use the GRAPH32.OCX from BPS as a replacement for the Centura QuickGraph. This .app was build using the Centura OLE class wizard. The sample also include 3 options for printing the graph. Content of .ZIP is QGOCX.SQL, QGOCX.APT, QGOCX.HTM and 2 .QRP's. The .HTM tell you where you can find GRAPH32.OCX as FREEWARE.

QG.ZIP - QuickGraph with SAL, 2 print options included (freeware)

Simple sample that show how to use the QG with SAL. It also include two options for printing the graph, one using a .WMF file, and another showing how to print the QG by linking it to detail lines in a .QRP report. The sample is using the BUDGET table from the sample database. QG.ZIP include QG.SQL, QG.APT and two .QRP's. Sample is SW 5.03 and ReportWindows 3.03. Guidelines for easy migration to CTD is included

VB5SQL.ZIP - VB5 connect using SQLWNTM.DLL (freeware)

This is a VB5 program that show how to connect to SQLBase by using calls to the c/api. You need the 32bit SQLBase Server Engine and SQLWNTM.DLL to run this sample. All components inside the .ZIP are named SQLWNTM.*

ODBCTALK.ZIP - Get connected with ActiveX (freeware)

This CTD sample .app show how to use OdbcTestX.ocx from a Centura application. Use this .OCX to build your own ODBCtalk tool, ie: 1.) Get a list of available ODBC data sources, 2.) Get a list of available tables in a data source, 3.) Get a list of available columns in a table, 4.) Issue SQL commands, 5.) Get unedited ODBC error messages, 6.) Examine the rows and columns in the result sets from SELECT statements, 7.) Read selected rows one at a time and copy the data into string variables, 8.) Dynamically change translate tables for text variables, 9.) Use Commit and Rollback ... and much more. Include 15 pages documentation in .HTM format.