Delphi32.com - Home!
| Home/News | Downloads | Forums | D32 Magazine | Resources | Info and Facts |  
 
 Converting ASCII files to Paradox tables


How do I import my ASCII file into a Paradox table? Can the Database Desktop do it?   

    No, the Database Desktop can't do it. Drop TBatchMove and 2 TTables on a form. Set BatchMove::Mode to batCopy, and Source and Destination to Table and Table2, respectively. Set Table ::TableName to an empty Paradox table created with the same structure as the Ascii file. Set Table2::TableName to any non-existant table name such as FOO.TXT, and set Table2::TableType to ttASCII. Double-click on the form and type, BatchMove ->Execute() into the created OnCreate method. Press F9 to build and run. The files FOO.TXT and FOO.SCH should be created. Now copy the ASCII text file to the directory where FOO.TXT is located. Open FOO.SCH and changed the first line to read the name of the name of the ASCII data file instead of "FOO". Add statements for delimiter and separator, and change Filetype= to "varying" if appropriate. Rename FOO.SCH to the name of the ASCII data file .SCH. Back in your program, change Table2::TableName to the name of your ASCII data file. Change BatchMove::Source to Table2 and BatchMove ::Destination to Table. F9 to rebuild and run. You can now open the paradox table in Database Desktop and see your data. If the data did not splice correctly into the target fields, you will need to modify your schema file (.sch). Also see the file ASCIIDRV.TXT in Delphi3, or TI2844 "Using The ASCII Driver With Comma-delimited Files", or Delphi3\Help\Examples\Batchmv.

     



  << Previous Faq     Complete List     Next Faq >>  



 
 Hits/month  2,500,000+ 
 Downloads
 (Since May 2000)
 7,393,709 
 Total Files  6,023 
 Forum msgs  7,670 
 Articles/FAQs  70+/900+ 
Kylix
Tips n Tricks
FAQs
Knowledge Base
Bug Listings
Articles
Books
Newsgroups
Links
Submissions
Testimonials
Advertising
Contact Us
About Us
Search Amazon:
Top Selling Software at Amazon

| Home/News | Downloads | Forums | Resources | Info and Facts | Testimonials |
  Site Search:
 


Comments/Problems: Webmaster@delphi32.com
Copyright © 1998-2006, Delphi32.com. All rights reserved.
Terms of Use