Notes
Slide Show
Outline
1
LA-FOX Presentation:
VFP and SQL databases
  • March 28, 1999
  • Jonathan D. Melvin
  • JDMCS, Culver City, CA
2
Part I: VFP Tools for SQL Server
  • SQL database access classes
  • Browsing SQL databases
  • Scripted data importers
  • Maintenance from VFP programs
3
SQL database access classes
  • Subclasses for
    • SQL server
    • Access
    • Borland database engine
    • xBase
  • Methods (execute, browse, create/update)
4
Browsing SQL databases
  • SQL server example
  • Access example
  • VFP example
5
Scripted data importers
  • Extract classes
  • Processing classes
  • Import classes
  • The script syntax
  • The loadtables program
6
Maintenance from VFP programs
  • …init.prg - create a public object for accessing a SQL database
  • Fix….prg - history of maintenance of a SQL database
  • …index.prg - reindex
  • fixdb.prg - do dbcc on each table
  • dumplog.prg - dump the transaction log
  • spaceused.prg - list tables, sizes, #records
7
Part II: Active Server Page Scripts
  • Data driven
  • Full access control
  • Extensive use of SQL
8
Data driven: The naming conventions
  • Fields names give column and row captions
  • Field name beginnings give hidden attributes
  • Field name endings give foreign key attributes
  • __ postfix gives edit access to fields
  • Different views give different access to various groups of users
9
Example 1: Chamber of Commerce
  • Directory entry access
  • Calendar and schedule access
10
Example 2: Gas station monitoring
  • Access to imported data reports
  • Access to data header information override fields
  • Special reports - issues of formatting, pagination
  • Examples of complex SQL queries (on-line and compliance reports)
11
Example 3: School
  • All code in one script
  • Use of SQL views
  • VRAD (Very rapid application development)