Apollo 7 - Win32 Components
Included with Apollo 7
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
Applies to VBScript and classic ASP
Installing Apollo ASP on your IIS web server
- FTP ApolloASP7.DLL and C:\Program
Files\Apollo7\Engine\Deploy\SDE*.DLL to your web server.
- 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)
- If you plan to use Apollo for one web site
only, then FTP these 2 files to your web site's ..\Bin directory
- After the files are on your web server, you will
need to run:
RegSvr32 ApolloASP7.DLL /install
- The ApolloASP objects (Database, Table, Query,
Email) are now available for use by any application on the web server
Directories and Permissions
- 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
- To ensure that your ASP web application will work,
assign EVERYONE permissions to the ..\Data directory
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
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
Set
myDB = CreateObject( "ApolloCOM7.Database" )
myDB.ASPMode = False myDB.Directory =
"C:\MyApp\Data" myDB.DatabaseName =
"Test.DBF" myDB.Open
Set myTable = CreateObject(
"ApolloCOM7.Table") myTable.Database = myDB myTable.TableName
= "Customer" myTable.Open
while (not myTable.EOF) fname
= myTable.GetString("First") lname =
myTable.GetString("Last") Response.Write( fname +" "+
lname +
"") myTable.Next wend
myTable.Close Set
myTable = Nothing
Set myQuery =
CreateObject( "ApolloCOM7.Query") myQuery.Database =
myDB myQuery.SQL = "SELECT * FROM
Customer" myQuery.Open
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
Creating your first classic ASP web app
- Open a text editor for writing ASP VBScript
- 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 %>
- 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 |
 |
|