1 / 11
Move a Visual FoxPro 9 application's data from DBF tables to SQL Server and keep the VFP front end: ODBC drivers and connection strings, connections, SQL pass-through with parameters, multiple result sets, error handling with AERROR, data type mapping, remote views, CursorAdapter with ODBC and…
Client-Server Development with SQL Pass-Through, Remote Views, and CursorAdapter
Read before you buy: the PDF here is a free sample — the first 20 pages of the 447-page book (payments, sales and reviews on this demo site are sample data). Get the full e-book at thenexbooks on Gumroad.
Keep the Visual FoxPro application you trust. Move its data to SQL Server — safely, step by step.
Many VFP applications still run the business every day, but DBF tables in a shared folder struggle with several branches, VPN connections, growing data, security audits, and other systems that need the same data. Visual FoxPro 9 was built to work with a database server: SQL pass-through, remote views, and the CursorAdapter class all return ordinary VFP cursors, so your forms, grids, and reports keep working. What is hard is everything around the syntax — drivers, type mapping, safe updates, migration, and deployment. This book covers all of it, with code that was run against a real SQL Server instance from Visual FoxPro 9.
What's inside
- Client-server thinking for VFP developers: what moves to the server, what stays in VFP, and a migration roadmap
- Setting up SQL Server for development, collations that match VFP code pages, and running schema and seed scripts
- ODBC with 32-bit VFP: the drivers that work, DSN vs DSN-less connection strings, and reading the installed drivers from the registry
- Connections with SQLSTRINGCONNECT, SQLCONNECT, and SQLSETPROP, shared connections, timeouts, and a reusable connection class
- Data type mapping with real results: Currency and money, dates and datetime2, Memo and varchar(max), Logical and bit, NULLs, and Unicode with nvarchar
- SQL pass-through in depth: SQLEXEC return values, ?parameters and variable scope, stopping SQL injection, multiple result sets, SQLMORERESULTS, SQLPREPARE, and asynchronous execution
- Error handling with AERROR: SQLSTATE, native error numbers, and friendly messages
- Remote views and connections in a DBC, updatable views, KeyFieldList, UpdatableFieldList, UpdateNameList, WhereType, and update conflicts
- CursorAdapter with ODBC and ADO, CursorSchema, updates, and a reusable base class for forms
- Transactions, stored procedures with output parameters, SCOPE_IDENTITY, sequences, and rowversion concurrency
- A scripted DBF-to-SQL Server migration with verification: row counts, sums, and an exact comparison
- Performance (fetch size, progressive fetching, indexes, avoiding N+1 queries), security (Windows authentication, least privilege, roles), deployment, and troubleshooting
- A capstone that converts a complete DBF-based module to client-server code
One running example, start to finish. You work on RentDesk, the rental system of Brackenridge Equipment Rentals, a fictional construction-equipment rental company with three yards, customers from builders to a city public-works department, equipment items, rental contracts, contract lines, returns, and invoices. The book defines the DBF tables and the SQL Server schema, migrates the data with a verified script, and rebuilds data access from the first SQLEXEC call to stored procedures that open contracts, return equipment, and create invoices with exact rental-day, tax, deposit, and refund calculations. The sample data is small enough to check by hand.
Practical and honest. The book targets Visual FoxPro 9.0 SP2 and SQL Server 2022 (Express is enough), with notes where drivers or versions behave differently and clear statements of what we observed in our tests. It contains no invented benchmarks or statistics. Every chapter includes complete code, Tips, Notes, Warnings, Try It Yourself exercises, and Key Takeaways, and the appendices give you a cheat sheet, templates and reference tables, a production checklist, and a glossary.
Format: PDF, 447 pages (A4), linked table of contents and bookmarks. English. First Edition, 2026. Published by thenexbooks. Visual FoxPro and SQL Server run on Windows. This book is independent and is not affiliated with, sponsored by, or endorsed by Microsoft Corporation.
Table of Contents
Part I — From DBF to Client-Server
- Ch 1 · Why Move a VFP Application to SQL Server: Client-Server Thinking and the RentDesk Plan
- Ch 2 · Setting Up SQL Server for VFP Development: Instances, Tools, and the Brackenridge Database
- Ch 3 · ODBC Drivers and Connection Strings: DSNs, DSN-less Connections, and 32-bit Reality
- Ch 4 · Connecting from VFP: SQLSTRINGCONNECT, SQLCONNECT, SQLSETPROP, and Shared Connections
- Ch 5 · Data Type Mapping: Currency, Dates, Memos, Logicals, NULLs, and Unicode
Part II — SQL Pass-Through
- Ch 6 · SQL Pass-Through Fundamentals: SQLEXEC, Result Cursors, and Server-Side SQL
- Ch 7 · Parameterized Queries: ?Parameters, Variable Scope, and Stopping SQL Injection
- Ch 8 · Multiple Result Sets, SQLMORERESULTS, SQLPREPARE, and Asynchronous Execution
- Ch 9 · Error Handling: AERROR, ODBC Errors, and the BrConnection Class
- Ch 10 · Changing Data with SQL Pass-Through: INSERT, UPDATE, DELETE, and Updatable Cursors
Part III — Remote Views and CursorAdapter
- Ch 11 · Remote Views and Connection Definitions in a DBC
- Ch 12 · Updatable Remote Views: Key Fields, Update Names, WhereType, and Buffering
- Ch 13 · CursorAdapter Fundamentals: ODBC Data Sources, CursorSchema, and CursorFill
- Ch 14 · CursorAdapter in Depth: Updates, Events, ADO, and the BrCursorAdapter Base Class
- Ch 15 · Choosing an Access Technique and Binding Remote Data to Forms
Part IV — Server-Side Logic and Data Integrity
- Ch 16 · Transactions: Manual Mode, SQLCOMMIT, SQLROLLBACK, and Server Transactions
- Ch 17 · Stored Procedures from VFP: Input, Output, and Result Sets
- Ch 18 · Identity Values, Sequences, and Business Numbers
- Ch 19 · Concurrency: Update Conflicts, rowversion, and Resolving Collisions
- Ch 20 · Constraints, Triggers, and Validation: Moving Rules to the Server
Part V — Migration, Performance, and Security
- Ch 21 · Planning the Migration: Inventory, Schema Design, and Type Decisions
- Ch 22 · Migrating the Data: Scripted Upsizing from DBF and Proving It Worked
- Ch 23 · Performance: Fetch Size, Progressive Fetching, Indexes, and Avoiding N+1 Queries
- Ch 24 · Security: Windows Authentication, SQL Logins, Least Privilege, and SQL Injection
Part VI — Deployment and the Capstone
- Ch 25 · Deployment: Drivers, Configuration Files, and Rolling Out the Client
- Ch 26 · Reports and Read-Heavy Screens Against SQL Server
- Ch 27 · Diagnostics and Troubleshooting: Logging, Tracing, and Common Failures
- Ch 28 · Capstone: Converting the RentDesk Contracts Module from DBF to SQL Server
Appendices
A · Client-Server Cheat Sheet
B · Templates and Reference
C · Production Checklist
D · Glossary
Book details
| Detail | |
|---|---|
| Pages | 447 |
| Format | PDF (A4) |
| Language | English |
| Level | Intermediate to Advanced |
| Edition | 1st Edition (2026) |
| Download on this site | Free sample, first 20 pages (PDF) |
| Publisher | thenexbooks |
Files you get
No reviews yet. Only buyers can review.
More from thenexbooks