Home arrow SQL Server arrow Page 2 - How to Connect to a SQL Server from Visual FoxPro

How to Connect to a SQL Server from Visual FoxPro

Sayed explains how one could connect from Visual Foxpro to a SQL Server, and the problems related to making this connection.

Author Info:
By: Sayed Geneidy
Rating: 5 stars5 stars5 stars5 stars5 stars / 65
August 24, 2003
  1. · How to Connect to a SQL Server from Visual FoxPro
  2. · Conclusion

print this article

How to Connect to a SQL Server from Visual FoxPro - Conclusion
(Page 2 of 2 )

To establish the connection with the remote server you can use one of two functions SQLConnect() OR SQLStringConnect() and there are two ways to use the SQLConnect() function to connect to a remote data source. The first requires that you supply the name of a data source as defined in the ODBC Data Source Administrator applet of the control panel and the second way to use SQLConnect() is to supply the name of a Visual FoxPro connection that was created using the create connection command.

The other function is SQLStringConnect() requires a single parameter, a string of semicolon-delimited options that describes the remote data source and optional connections settings. We have to know that both the SQLConnect() and SQLStringConnect() functions return a connection handle. To break the connection to the remote data source is by using the SQLDisconnect() function.

DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus

- Executing SQL Server Stored Procedure from P...
- How to Search for Date and Time Values Using...
- Replication: SQL Server 2000 - Part 2
- Replication: SQL Server 2000 - Part 1
- SQL Sever: Storing Code in Binary or Text Fi...
- Execute SQL on Multiple Tables/Columns - New...
- How to Connect to a SQL Server from Visual F...
- SQL Server Hardware Tuning and Performance M...
- Primary Key on Multiple Tables New RDBMS C...
- Migrating from Sybase to SQL Server
- What's Best for DBAs? GUI or T-SQL Comma...
- How to Perform a SQL Server Performance Audit
- An Introduction To The Bulk Copy Utility
- SQL Server Stored Procedures 101
- Building Your First SQL Server 2000 Database

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials