question

Richard avatar image
Richard asked

Write Data to Dbf (Foxpro) From SQL Server

Hi Everyone!. I want to write data from SQL 2000 to Foxpro (dbf) file on the network share through the web application by using stored procedure. Please help me if you have any idea?

sql-server-2000foxpro
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Pavel Pawlowski avatar image
Pavel Pawlowski answered

Hi, once you have access to the .dbf file, you have 2 basic possibilities how to read and how to write to the .dbf file.

  1. You can create a linked server using ODBC driver to this file. More info on MSDN
  2. You can read and write to the .dbf file using the OPENROWSET. see MSDN

Depending on your scenario if the dbf file should be also available to others while it is not being used by SQL server etc, you can use first or the second solution.

In both cases you will use Microsoft OLE DB Provider for ODBC and create an DSN for the ODBC source (.dbf file).

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.