Paradox Community

Items in pnews.paradox-client_server

Subject:Re: MS SQL and DB files
Date:Sat, 26 Mar 2022 13:44:01 +1100
From:Tom Krieg <tomkIGNORE@CAPSsdassociates.com.au>
Newsgroups:pnews.paradox-client_server


On 26/03/2022 12:02 pm, Tom Krieg wrote:
> To transfer a table, I'd create a CSV file of the table, 

Using Paradox to create a csv file of the .db table

> command to the server to IMPORT the CSV file into the server table. MS 
> Transact SQL has an IMPORT function.

In T-SQL (MS SQL Server) use the BULK INSERT command.

Make sure your MS-SQL table, with indexes and keys, already exists. You 
can either drop the table, then CREATE the table with all keys and 
indexes each time, or you can empty the table with a Delete * command. 
So the steps would be (in a Paradox script or form):

1. Export the table to a CSV file.
2. Issue a pass-through sql command to empty the server table (DELETE *)
3. Issue a pass-through SQL command to BULK-INSERT from csv to the 
server table.

If you have a csv file MS-SQL translates field types.

Done


Copyright © 2004 thedbcommunity.com