Alaska Software Inc. - Re: Why DbExport doesn´t keep in mind Data Types Integer or Money?
Username: Password:
AuthorTopic: Re: Why DbExport doesn´t keep in mind Data Types Integer or Money?
Andreas Gehrs-Pahl

View the complete thread for this message in:

Re: Why DbExport doesn´t keep in mind Data Types Integer or Money?
on Sat, 19 Nov 2016 23:48:23 -0500
César,

>I don´t understand why DbExport doesn´t export data of fields type Integer 
>or Money to CSV

The following line:

>DbeInfo(COMPONENT_DATA, DBE_DATATYPES, "CDLN")

is not sensible at all. The DBE_DATATYPES define is a read-only feature, 
that will report the DBE's data types. It can't be used to set any values.

Also, you do have the complete source code for the DbExport() function in 
the "...\Source\Runtime\Sys\dbbulk.prg" file, so you can see that this 
function filters out all the fields that are not of type "CDLN" -- the only 
field types that the DELDBE understands, in lines 229 to 236.

You could simply use the DbExport() code and remove or modify that filter 
to work with the field types that you would like to use, or write your own 
export function, without all the overhead that comes with DbExport(). 

The simplest way would be to convert "I", "F", "S", and "Y" field types to 
"N" in that filter loop, rather than deleting those fields from the arrays.

Hope that helps,

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas@AbsoluteSoftwareLLC.com
web:   http://www.AbsoluteSoftwareLLC.com
[F]:   https://www.facebook.com/AbsoluteSoftwareLLC