Q: How can I turn an SQL file into an ASCII text file?
A: Under Visual dBASE 7, in order to output an Interbase table (or some other SQL server table) to an ASCII text file, follow these instructions:
First, make sure you have a BDE Alias created for your SQL Database. Creating a BDE Alias is done by doing the following:
This is the very minimum you need to do. Select the "Object" menu again, and select "Apply" to save your changes.
Bring Visual dBASE 7 up, and:
You should see some icons at the bottom representing databases -- one of these should be named the same as your BDE Alias. Click on it. You may need to enter a password (the InterBase default password is "masterkey").
In the Command Window, type
USE tablename (where tablename is the name of the table)
COPY TO "textfile.txt" DELIMITED (where "textfile.txt" is the name of your text file)If you do not want quotes around your character fields, and commas between all fields, you may want to use "SDF" instead of "DELIMITED" in the statement shown above.
Your table should be in a standard format now, and readable by other software.