How to connect SQL Server to VFP database

Source: Internet
Author: User
Tags sql server query

The interconnection of different database platforms is generally called the heterogeneous service of databases. Currently, all major databases can achieve such Heterogeneous Interconnection, but the specific implementation technologies of different vendors are different, such: in SQL SERVER, it is called LINKED SERVER, and ODBC is used to interconnect with other databases.

The test environment in this article is:

Operating System: WINDOWS2000 SERVER (Traditional Chinese System)

Install the database: SQLSERVER2000 (English version) and VFP6.0

Specific steps:

1. Install VFP6.0 and SQL Server2000 on the PC.

2. Configure the ODBC data source for windows.

Choose "start"> "program set"> "System Management Tools"> "Data Source"> "ODBC" to configure the user DSN or system DSN: add-select microsoft foxpro vfp driver (*. DBF)-> On the odbc visual foxpro setup screen, you can select visual foxpro databse (* for Custom Data Source names (such as VFPTEST)-> database type (*. or free table directory (*. if DBF is selected, You can freely select the Directory)-"OK.

ODBC configuration and test completed!

3. Configure the connection server in sqlserver2000

Choose Enterprise Manager> Security> connection Server> Create connection Server> define the connection name, select another data source, and set the program name to microsoft ole db provider for odbc driver; the product name is optional. The data source specifies the name of the data source defined in ODBC. The provider string is in the following format: User ID = username; Password = userpasswd (or in the following format: UID = username; PWD = userpasswd). the user name and password here correspond to the user name and password in the VFP database to be connected-Security Tab: set to use this security context, enter the database user name and password of VFP. On the server option tab, click "-" by default.

4. All preparations have been completed!

In sqlserver Enterprise Manager-> Security-> connection server, open the newly established connection server-> click the table, and you can see all the table names owned by the VFP database users in the right window, however, the table records cannot be viewed here. You need to use specific SQL statements in the SQL Server Query analyzer! When accessing a table, the format is [connection server name]... [VFP user]. [Table name]. For more details, I will not go into details here.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.