Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to extract a database from ms sql server in .dbf format

Status
Not open for further replies.

surovi99

IS-IT--Management
Feb 11, 2005
28
US
I have come up with a query with my database in ms sql server. How do I extract it in .dbf format? As soon as possible help will be very much appreciated.

Many thanks in advance...
 
DTS export wizard should do the trick. For least compatibility problems, use dBase III driver.

Note that .dbf (dBase) is ancient format with lots of limitations. To mention some:

- filename must have no more than 8 characters (DOS 8+3 format)
- column names are limited to 10 chars
- max. length of data per column is 255 (IMO)
- most of dBase drivers cannot read files behind 2GB.

Math problems? Call 0800-[(10x)(13i)^2]-[sin(xy)/2.362x]
 
How to use DTS export wizard from an interface to ms sql server? I am using php and javascript for the interface. Is there any other way?

Many thanks in advance...
 
For admin purposes, you can start wizard through Enterprise Manager (right click on any table -> Export data) or by running dtswiz.exe.

Programmatically: with DTS API. You may check forum961, though calling from PHP presents some extra problems.

By using PHP only: use mssql_*() functions to retrieve data and dbase_*() functions to save target dBase file.

------
Math problems? Call 0800-[(10x)(13i)^2]-[sin(xy)/2.362x]
 
Please suggest me some codes by using php only.

To retreive data for example I will use:

$query = "SELECT * FROM User";
$result =mssql_query($query);

What dbase_*() functions will I use to save target dBase file?

Many, many thanks....

 
header( "Location: forum434" ); // :)

(hint: start with dbase_create() )

------
Math problems? Call 0800-[(10x)(13i)^2]-[sin(xy)/2.362x]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top