Trouble importing ascii file into .tps database file. 
Author Message
 Trouble importing ascii file into .tps database file.

If you are hand coding this, you would do it as follows:
OPEN( ASCII_File )
OPEN( TopSpeed_File )
set( ASCII_File )
loop
   next( ASCII_File )
   if errorcode() then break.
   TopSpeed_File:Field = ASCII_File:Field !Repeat once for each field
   Add( TopSpeed_File )
   if errorcode() then stop( clip( error() ) & ' From Add' ).
END !Loop
CLOSE( ASCII_File )
CLOSE( TopSpeed_File )

This is the most simple way to do it. Once you get the hang of it, try
looking at the following in the Language Reference:

STREAM() / FLUSH()
APPEND() / BUILD()

Also check into the /FILEBUFFERS driver switch for ASCII files in the
Users Guide.

HTH!

Quote:

> I have an empty .TPS file.  From the .TPS file,I want to import an
> ascii file whose field sizes match the .TPS file structure.  This is a
> common task for database developers, however I have not been able to
> do this.  As a former foxpro developer, this would be easy.  I want to
> do the Clarion equivelent of the following Foxpro code:

> use <TopSpeed database file>             && Open the database file
> append from <ascii text file> sdf        && Append the ascii records.
> use                                      && Close the file.

> I'm using an evaluation copy of Clarion 4.  It looks like you have to
> create some type of conversion program and I've attempted to do that,
> but with no success.  Could someone provide detailed steps on how to
> do this?

> Thank-you

> Ed Fitzpatrick




Fri, 27 Apr 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. how to export ASCII files from .TPS files ?

2. Import a text file into a C5 .TPS file

3. Help needed,Hot to send .TPS to ASCII file

4. importing TPS files

5. Trouble opening TPS files

6. Importing multiple columns from different .csv files into one .tps table

7. Converting Clarion TPS files for import in Excel

8. Import (append) data to a .tps file

9. Import from .tps files to SQL Server or Access

10. importing ascii file

11. Importing ASCII File-HELP

12. Importing Ascii File

 

 
Powered by phpBB® Forum Software