Notes
Outline
Slide 1
Slide 2
Client-Server and VFP
Level: Intermediate
Familiarity with VFP, DBC, Views
Client-Server and VFP
What is Client-Server?
Why Client-Server?
Why NOT Client-Server?
How? ODBC/SPT/Views
Advanced Techniques
Learning More
What is Client-Server?
Two separate processes
Same or different machines
Why Client-Server?
Bandwidth
VFP is designed for LANs
Data size
VFP limited to 2 Gb file size
Security
VFP tables can be read by anyone
Why NOT Client-Server?
Resource Constraints
Programmer skill & training
Need for on-going DBA maintenance
Infrastructure stability
Performance
Rushmore is still king
Hardware can solve this
How?
Connectivity - DSNs & Connections
Two Paths: SPT & Views
SPT: Manual, full control
Views: GUI, simpler, limited
Connections
ODBC Data Set Names (DSN)
SQLConnect()
SQLStringConnect()
Connections
DBC-defined Connections
CREATE, DELETE, MODIFY, RENAME, DISPLAY CONNECTION
Beware: Share Connections
Transactions are at the connection level
Views
Create graphically or programmatically:
CREATE, DELETE, MODIFY, RENAME, DISPLAY VIEW
SQL Pass-through
Utility Functions: SQLTABLES(), SQLCOLUMNS()
Connection functions, already covered
SQLExec() passes commands to the  server, via ODBC
SQLCOMMIT(), SQLROLLBACK() completes transactions
Fine Control: Properties
SQLGetProp, SQLSetProp()
works on Connections
DBGetProp(), DBSetProp()
works on DBC - persistent
CursorSetProp(), CursorGetProp()
works on open cursors
Advanced Client-Server
SQL can be:
Batched
Fetched progressively
Precompiled
Requires a separate connection
Learning Client-Server
Start with ODBC against FoxPro
Server “Lite” available from most vendors
Use ODBC DSNs, Views
Use GenDBC to see how commands & functions work
Start with automatic transactions
Summary
What? Two separate processes
Why?
Bandwidth
Data Size
Security
Why Not?
Resource constraints
How? Carefully!
Slide 17