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.