Free Trial   |  Purchase   |  Products   |  Downloads   |  Support     

Apollo 7.3 - Win32 Components


Included with Apollo 7.3

Overview

The Apollo Win32 components include an OLE DB Data Provider, COM objects for Win32 development and for classic ASP development.

Features

  • Create Win32 and ASP applications using variety of dev tools
  • Create, update and manage Clipper and FoxPro DBF/Xbase database files from code
  • COM objects for Win32 and classic ASP
  • OLE DB Data Provider
  • OLE DB Data Provider is fully compatible with databound controls
  • Import CA-Clipper and FoxPro 2.6 data into Windows applications such as
    Crystal Reports, MS-Excel, MS-Word, etc.
  • COM objects do not require MDAC
  • COM objects features Direct Data Access™ (DDA) and SQL support
  • COM objects are easily scalable from embedded to client/server configuration with little code changes
  • Samples with full source code

Supported IDEs

  • C/C++ 6
  • Visual Basic 6
  • Visual Basic 5
  • Any tool/application that supports OLE DB Providers
  • Any tool/application that supports COM

Supported Languages

  • C/C++
  • PowerBasic
  • VBScript (with classic ASP)
  • Visual Basic

Supported Platforms

  • Win32
  • ASP on IIS
  • OLE DB Provider requires MDAC 2.5 or later
  • COM does not require MDAC

Win32 Components

OLE DB Provider

ApolloOLEDB7 Provider

  • Connection
    Connects to a DBF/Xbase database and manages the session.
  • Command
    Allows you to issue commands to add, delete, update, filter and find data, along with other table related operations.
  • RecordSet
    Stores the data for a record

Classic ASP Components

Direct Data Access™ Objects

  • ApolloASP7.Database
    Connects to a DBF/Xbase database and allows you to manage database level settings such as encryption.
  • ApolloASP7.Table
    Connects to DBF tables allowing you to add, delete, update, filter and find data, along with other table related operations.
  • ApolloASP7.Query
    Runs SQL-92 queries and commands to manage data in a DBF files. The Query object supports all the common SQL statements such as SELECT, INSERT, UPDATE, DELETE and more.
  • ApolloASP7.Email
    This Email object is a full featured SMTP email component that lets you send emails from your ASP pages. It supports attachments, multiple users and much more.

COM Components

Direct Data Access™ Objects

  • ApolloCOM7.Database
    Connects to a .DBF database and allows you to manage database level settings such as encryption.
  • ApolloCOM7.Table
    Connects to DBF tables allowing you to add, delete, update, filter and find data, along with other table related operations.
  • ApolloCOM7.Query
    Runs SQL-92 queries and commands to manage data in DBF files. The Query object supports all the common SQL statements such as SELECT, INSERT, UPDATE, DELETE and more.

Using & Sample Code

Installing Apollo ASP on your IIS web server

Applies to VBScript and classic ASP

Installing Apollo ASP on your IIS web server

  1. FTP ApolloASP7.DLL and C:\Program Files\Apollo7\Engine\Deploy\SDE*.DLL to your web server.
    1. If you plan on building multiple ASP web applications that use Apollo, then FTP these files to a main directory on your web server (e.g. C:\Program Files\Apollo7\ASP)
    2. If you plan to use Apollo for one web site only, then FTP these 2 files to your web site's ..\Bin directory
  2. After the files are on your web server, you will need to run:
    RegSvr32 ApolloASP7.DLL /install
  3. The ApolloASP objects (Database, Table, Query, Email) are now available for use by any application on the web server

Directories and Permissions

  1. For this sample, we assume you have this directory structure:
    C:\inetpub\wwwroot\MySite
    C:\inetpub\wwwroot\MySite\Bin    [optional]
    C:\inetpub\wwwroot\MySite\Data
  2. To ensure that your ASP web application will work, assign EVERYONE permissions to the ..\Data directory

Sample Code - OLE DB Provider with Visual Basic

The Apollo OLE DB Provider provides high-speed ADO/OLE DB data access into a Apollo database.

VB sample using the Apollo OLE DB Provider

procedure TryApollo

  Adodc1.Connect = "Provider=ApolloOLEDB7.ApolloOLEDB;Database Name=ApolloDemoQuery.DBF"

 Adodc1.OLEDBString = "Provider=ApolloOLEDB7.ApolloOLEDB;Database Name=ApolloDemoQuery.DBF"

  Adodc1.ConnectionString = "Provider=ApolloOLEDB7.ApolloOLEDB; Database Name= " & CurDir & "\ApolloDemoQuery.DBF"
 Adodc1.RecordSource = "SELECT * FROM COMPUTERS"
 Adodc1.Refresh
 Set DataGrid1.DataSource = Adodc1

end sub

Sample Code - COM objects with Visual Basic

Apollo's COM objects provides high-speed access to Apollo databases. The Apollo COM objects include Database, Table, Query and an Email object for ASP applications.

VB sample using Apollo COM objects

procedure TryApollo

' Create the database connection object
 Set myDB = CreateObject( "ApolloCOM7.Database" )

' Switch between ASP and Win32 applications, default is False
 myDB.ASPMode = False
 myDB.Directory = "C:\MyApp\Data"
 myDB.DatabaseName = "Test.DBF"
 myDB.Open

' 1. Non-SQL ------------------
' Create the table object, connect it to the database and open
 Set myTable = CreateObject( "ApolloCOM7.Table")
 myTable.Database = myDB
 myTable.TableName = "Customer"
 myTable.Open

' Traverse all the records
 while (not myTable.EOF)
   fname = myTable.GetString("First")
   lname = myTable.GetString("Last")
   Response.Write( fname +" "+ lname + "")
   myTable.Next
 wend

 myTable.Close
 Set myTable = Nothing

' 2. SQL ----------------------
' Create the query object, connect it to the database and open
 Set myQuery = CreateObject( "ApolloCOM7.Query")
 myQuery.Database = myDB
 myQuery.SQL = "SELECT * FROM Customer"
 myQuery.Open

' Traverse all the records
 while (not myQuery.EOF)
   fname = myQuery.GetString("First")
   lname = myQuery.GetString("Last")
   Response.Write( fname +" "+ lname + "")
   myQuery.Next
 wend

 myQuery.Close
 Set myQuery = Nothing

 myDB.Close
 Set myDB = Nothing

end sub

Sample Code - ASP objects with classic ASP

Creating your first classic ASP web app

  1. Open a text editor for writing ASP VBScript
  2. Copy this code into your editor:

    <%@ Language=VBScript %>
    <% dim adb, aQuery, lname, rowid

    Set adb = Server.CreateObject("ApolloASP7.Database")
    Set aQuery = CreateObject("ApolloASP7.Query")

    adb.ASPMode = true
    adb.DatabaseName = "C:\inetpub\wwwroot\MySite\Data\Test.dbf"
    adb.Exclusive = False
    adb.open
    aQuery.SQL = "SELECT * FROM Customer"
    aQuery.open
    While (Not aQuery.EOF)
       rowid = Cstr(aQuery.RowID)
       lname = Trim(aQuery.GetString("Last"))
       Response.write( rowid + ":" + lname +"<br>")
       aQuery.Next
    Wend
    aQuery.Close
    adb.Close
    Set aQuery = Nothing
    Set adb = Nothing
    %>

  3. Run and press the button on the form.

Architecture Diagrams

 

Single User - Local Access

 
 
 

Single User - File Share or LAN Data Access

 
 
 

Multiple Users - File Share or LAN Data Access

 
 
 

Multiple Users - Web Data Access

 
 
 

Multiple Users - Client/Server Access

 
 
 

Multiple Users - Client/Server Access with Apollo Relay Server

 

  Products Technologies Support Company
 
© Copyright 1999-2013 Vista Software. All rights reserved.