0% found this document useful (0 votes)
41 views35 pages

Visual FoxPro & SQL Server Guide

This document contains a table of contents for a book on client/server development with Visual FoxPro and SQL Server. It discusses topics like upsizing and migrating data from Visual FoxPro to SQL Server, extending queries with SQL pass-through, downsizing to allow for different database backends, debugging client/server applications, design considerations, application distribution, and managing updates. The document provides an overview of the contents and scope of the book.

Uploaded by

tv box acep
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views35 pages

Visual FoxPro & SQL Server Guide

This document contains a table of contents for a book on client/server development with Visual FoxPro and SQL Server. It discusses topics like upsizing and migrating data from Visual FoxPro to SQL Server, extending queries with SQL pass-through, downsizing to allow for different database backends, debugging client/server applications, design considerations, application distribution, and managing updates. The document provides an overview of the contents and scope of the book.

Uploaded by

tv box acep
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

8

1
xvii

FetchMemo 71
Tables 72
Field properties 72
DefaultValue 72
RuleExpression 73
UpdateName 73
DataType 73
Summary 74

Chapter 5: Upsizing: Moving from File-Server to Client/Server 75


Why upsize? 75
Using the SQL Server Upsizing Wizard 76
Indexes 81
Defaults 82
Relationships 84
Validation rules 85
Changes made locally 86
Finished at last? Modifying the results of the Upsizing Wizard 87
The local database 88
Summary 93

Chapter 6: Extending Remote Views with SQL Pass Through 95


Connecting to the server 95
The SQLConnect() function 96
The SQLStringConnect() function 96
Handling connection errors 97
Disconnecting 98
Accessing metadata 98
The SQLTables() function 99
The SQLColumns() function 100
Submitting queries 101
Queries that return a result set 101
Retrieving multiple result sets 102
Queries that modify data 105
Parameterized queries 105
Making SQL pass through result sets updatable 108
Calling stored procedures 109
Handling input and output parameters 109
Transaction management 111
Binding connections 113
Asynchronous processing 113
Connection properties revisited 115
Other connection properties 116
xiii

List of Chapters
Chapter 1: Introduction to Client/Server 1
Chapter 2: Visual FoxPro for Client/Server Development 19
Chapter 3: Introduction to SQL Server 7.0 27
Chapter 4: Remote Views 57
Chapter 5: Upsizing: Moving from File-Server to Client/Server 75
Chapter 6: Extending Remote Views with SQL Pass Through 95
Chapter 7: Downsizing 125
Chapter 8: Errors and Debugging 145
Chapter 9: Some Design Issues for C/S Systems 159
Chapter 10: Application Distribution and Managing Updates 177
Chapter 11: Transactions 193
Chapter 12: ActiveX Data Objects 209
Appendix A: New Features of SQL Server 2000 225
8

1
xvii

FetchMemo 71
Tables 72
Field properties 72
DefaultValue 72
RuleExpression 73
UpdateName 73
DataType 73
Summary 74

Chapter 5: Upsizing: Moving from File-Server to Client/Server 75


Why upsize? 75
Using the SQL Server Upsizing Wizard 76
Indexes 81
Defaults 82
Relationships 84
Validation rules 85
Changes made locally 86
Finished at last? Modifying the results of the Upsizing Wizard 87
The local database 88
Summary 93

Chapter 6: Extending Remote Views with SQL Pass Through 95


Connecting to the server 95
The SQLConnect() function 96
The SQLStringConnect() function 96
Handling connection errors 97
Disconnecting 98
Accessing metadata 98
The SQLTables() function 99
The SQLColumns() function 100
Submitting queries 101
Queries that return a result set 101
Retrieving multiple result sets 102
Queries that modify data 105
Parameterized queries 105
Making SQL pass through result sets updatable 108
Calling stored procedures 109
Handling input and output parameters 109
Transaction management 111
Binding connections 113
Asynchronous processing 113
Connection properties revisited 115
Other connection properties 116
xviii

Remote views vs. SQL pass through 118


SQL pass through 118
Remote views 119
Using remote views and SPT together 122
Transactions 122
Stored procedures 122
Filter conditions 123
Summary 123

Chapter 7: Downsizing 125


The case for a single code base 125
Interchangeable back ends 125
Remote views of VFP data 126
Substituting local views for remote views 128
Abstracting data access functionality 130
Microsoft Data Engine (MSDE) 136
What is MSDE? 136
MSDE vs. SQL Server 137
Distributing MSDE applications 141
Migrating MSDE databases to SQL Server 142
Summary 144

Chapter 8: Errors and Debugging 145


Handling errors 145
Trapping errors 145
Reporting errors 146
Conflict resolution 150
View errors 151
Debugging tools 152
SQL Server Profiler 152
The SQL Server Performance Monitor 155
ODBC logs 156
Summary 158

Chapter 9: Some Design Issues for C/S Systems 159


SQL database design issues 159
Data integrity mechanisms 160
VFP developer vs. SQL Server DBA 168
Client/server performance issues 169
Choosing indexes 169
Client/server division of work 171
Data location 173
Security 173
Client application 173
xix

SQL Server logins and permissions 174


Application roles 174
Summary 175

Chapter 10: Application Distribution and Managing Updates 177


Client/server development 177
Development environment 177
Deployment models 179
Traditional 179
Components 180
Server 180
Distributing databases (creating) 181
Existence of SQL Server 181
SQL pass through 182
SQL scripts 183
SQL-DMO 184
Object transfer (DTS) 185
Backup/restore 186
sp_Detach_DB and sp_Attach_DB 186
Managing updates 187
Application changes 187
Database updates 189
Version control coordination between client and server 191
Local lookup data 191
Why 192
Managing updates 192
Summary 192

Chapter 11: Transactions 193


Transaction basics 193
ACID properties 193
Visual FoxPro transactions 194
The missing property 195
SQL Server transactions 196
Implicit transactions 196
SQL Server isolation levels 198
Durable transactions 200
Locking 202
Lock compatibility 203
Blocking 203
Viewing lock activity 204
Deadlocks 207
Transaction gotcha! 208
Summary 208
xx

Chapter 12: ActiveX Data Objects 209


Why ADO? 209
ADO benefits 209
ADO disadvantages 211
Installing and distributing ADO 211
Using ADO within Visual FoxPro 212
The Connection object 212
The RecordSet object 214
The Command object 221
Summary 224

Appendix A: New Features of SQL Server 2000 225


Feature list 225
Installation issues 227
Query Analyzer 227
Debugging stored procedures 228
User-defined functions 229
Referential integrity 231
Trigger enhancements 232
Indexing computed columns 233
New data types 234
Big integers 234
Variants 234
Tables as variables 235
Summary 236
Client/Server Applications with Visual FoxPro and SQL Server

Common questions

Powered by AI

The development of the book involved contributions from multiple individuals and organizations, each playing specific roles. Whil Hentzen and Gary DeWitt were pivotal in initiating the project, while Chuck contributed through writing and technical completion with guidance from Chaim Caron. Other contributors, like Mike Levy and Leslie Koorhan, offered expertise in SQL Server and Visual FoxPro, respectively. Organizations like Micro Endeavors provided the learning environment necessary for acquiring relevant technical knowledge. These collaborative efforts ensured the book was comprehensive and technically accurate, reflecting the diverse expertise of its authors and contributors .

Client/server applications offer significant advantages over file-server systems by centralizing database processing, which enhances performance and minimizes the need for extensive workstation upgrades. Centralized processing on the server allows for the management of data requests, reducing network overhead by only transmitting necessary data to the client. Furthermore, improving database performance in a client/server setup can be achieved by upgrading the server alone, rather than numerous workstations, which can be costly. This setup results in fewer network round trips and less data transmission, thereby optimizing performance, especially in larger databases .

Acknowledgments in collaborative book writing play a crucial role in recognizing the collective effort behind the publication. They reflect the interdependence of various contributors, from technical experts to personal support figures, highlighting how diverse experiences and insights converge to produce comprehensive content. Personal support is especially significant as it provides the emotional and motivational backing necessary for enduring the demanding process of writing. The document illustrates this by thanking not only professional colleagues but also family members and friends, emphasizing how personal encouragement enables authors to focus on and complete their tasks effectively .

Client/server SQL databases reduce network overhead by minimizing data transmission between the client and the server. The architecture involves the client sending a SQL query to the server, which processes the request and returns only the specifically requested records. No unnecessary data is transferred, unlike in file-server systems, where raw data may be extensively shuffled between server and client for query processing. This efficient handling of data requests and responses entails fewer network operations, leveraging centralized data management at the server to streamline overall communication and reduce the need for extensive data movement across the network .

In a client/server database system, the client sends requests to the server, and the server processes these requests and responds with only the requested data. The client does not have direct control over the data on the server; it only interacts with the database through requests. This enhances security by eliminating back-door access to data, as all interactions must go through the server's controlled processes. Network efficiency is improved because the client only receives the data it expressly requests, thus minimizing network traffic. For example, when a client sends a SELECT statement to the server, only the matching records are sent back, reducing the quantity of transmitted data and the number of network round trips .

Creating user-defined data types (UDTs) in SQL Server enhances data integrity by allowing developers to define custom data types that reflect specific business rules or data structures. For example, databases that use specific codes like '901 Codes' for reporting can benefit from a UDT that encapsulates these codes, ensuring consistency and preventing incorrect data entries. The UDT also improves schema management by providing a clear and centralized definition of frequently used data structures, thereby facilitating maintenance and understanding of the database schema. This is particularly beneficial when dealing with complex databases with numerous fields that must adhere to specific formats .

Visual FoxPro views provide a predefined SQL SELECT that can be used to determine which columns to include in a result set or to perform multi-table joins, simplifying query formation for users. Views simplify reporting and data entry by consolidating complex queries into reusable objects. However, a limitation of VFP views is that they can only be called without parameters through SQL pass-through, making them less versatile outside of VFP applications. This restricts the ability to utilize these views fully in non-VFP environments, whereas SQL Server views, which support the same function, can be accessed by any SQL-compatible application .

Troubleshooting download issues on the Hentzenwerke website is managed by encouraging users to provide comprehensive details of their problems. Users are advised to first consult the errata or FAQs available, and if unresolved, contact support via email. Essential communication includes detailing steps to reproduce the issue, the resultant error messages, expected outcomes, and relevant contextual information. For instance, specifying the exact URL that resulted in a 404 error helps the team diagnose and tackle the problem effectively, highlighting the importance of clear and detailed user interaction in resolving technical issues .

Stored procedures in SQL Server enhance database functionality by allowing complex operations to be executed directly on the server, improving efficiency. In Visual FoxPro applications, stored procedures can significantly extend the capabilities of remote views. They allow operations such as data manipulation to be performed server-side, reducing the need for extensive client-server interactions and optimizing network performance. In complex applications, stored procedures serve as reusable procedures for handling repetitive tasks, such as validations or calculations, thereby streamlining application logic and enhancing maintainability .

For effective troubleshooting on the Hentzenwerke website, users should provide detailed information about their issue. Essential information includes the steps to reproduce the problem, the observed outcome, the expected outcome, and any other relevant context. For example, instead of stating 'downloads don’t work,' a more useful description could be 'I get a 404 error when I click on the Download Source Code link.' Such detailed reports facilitate quicker and more precise assistance from the support team .

You might also like