Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COPY TO command
Message
 
To
18/02/1998 02:43:17
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00079469
Message ID:
00080379
Views:
37
Cetin,

I want to thank you for the "nullcopy" function you gave me. It was just what I was looking for. I think it is some really "smart" programming. It took me a while to study it and figure out what it was doing, (me being a newbie and all). But after I studied it, I was able to understand it and make slight modifications to fit my needs. Us newbies are lucky to have guys like you around to ask questions. Thanks again.

Elgin.

>Hi Elgin,
>Then I'm afraid you should have your own dumper.prg.
>
>function nullcopy
>lparameters cDataFile, cOutput
>set century on
>set date to dmy
>use (cDataFile)
>handle=fcreate(cOutPut)
>nFields = fcount()
>=afields(aStruc)
>scan
>	cRecord = ""
>	for ix = 1 to nFields
>		do case
>			case type(field(ix)) $ "C"
>				cDumpVal = iif(isnull(eval(field(ix))),"",'"'+eval(field(ix))+'"')
>			case type(field(ix)) $ "NY"
>				cDumpVal = iif(isnull(eval(field(ix))),"",str(eval(field(ix)),aStruc[ix,3],aStruc[ix,4]))
>			case type(field(ix)) $ "L"
>				cDumpVal = iif(isnull(eval(field(ix))),"",iif(eval(field(ix)),".T.",".F."))
>			case type(field(ix)) $ "DT"
>				cDumpVal = iif(isnull(eval(field(ix))),"",dtoc(eval(field(ix))))
>			otherwise
>				loop
>		endcase
>		cRecord = cRecord + iif(empty(cRecord),"",",")+cDumpVal
>	endfor
>	=fputs(handle,cRecord)
>endscan
>=fclose(handle)
>use in (cDataFile)
>
>PS:You could trim() the cDumpVal.
>Cetin
Elgin Rogers
Epic Solutions
www.epicsolutions.net
Previous
Reply
Map
View

Click here to load this message in the networking platform