Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exporting memo fields to delimited database
Message
From
26/06/1998 05:12:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
26/06/1998 04:08:23
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00111863
Message ID:
00111868
Views:
27
>I have a requirement to export large database to a "|" delimited database. There are 13 fields required 2 of which are memo fields containing large quantities of text. The problem we are having is extracting this text, in the memo fields, for use in the ascii text file. We have tried to append the memo field to a file and then extract this using the clipboard commands of the win API but this does not seem to work.
>Has anybody got any suggestions as to how we might copy these fields into the delimitted ascii file.
>
>Thanks for any assitance
>
>Brendan
Breandan,
Export with lowlevel :
function dbfexport
lparameters cTableName, cFields, cWhere, cExportFileName
select &cFields from (cTableName) where &cWhere into cursor tcExport
handle=fcreate(cExportFileName)
#define maxlen 65535
scan
 for ix=1 to fcount()
   =fwrite(handle,Convert2Char(eval(field(ix)))+"|",MAXLEN)
   * Convert2Char is a function converting to char type if not
 endfor
 =fputs(handle,"") && Add CRLF
endscan
=fclose(handle)
use in "tcExport"
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform