Page 1 of 1

Import Text to Class...

Posted: Fri Aug 07, 2009 12:02 pm
by ConvertFromOldNGs
by Kevin R. Cook >> Wed, 30 May 2001 20:55:11 GMT

Has anyone developed a general utilitiy that imports text files and maps them to a target class?
I'm thinking of a mapping tool that allows me to choose the target class and the attributes creates a map to import the delimited text file columns into these specific attributes. Thus I could use these maps over and over again and create new ones as I needed to transfer flat files into my database.

krc

Kevin R. Cook
Indiana/USA
317 251 6977

Re: Import Text to Class...

Posted: Fri Aug 07, 2009 12:02 pm
by ConvertFromOldNGs
by Darrell Duniam >> Thu, 31 May 2001 21:54:07 GMT

Kevin,

BaseSchema has a class named CnEcCsvFile (a subclass of File) that can import a CSV file using the CnEcFileDefinition, CnEcFileRecord and CnEcFileField classes. You could try subclassing CnEcCsvFile in your application schema for each class you wish to map a file to.

regards,
darrell.

"Kevin R. Cook" <kevin@summitbenefit.com> wrote in message news:7fUx#nd6AHA.467@cnwchcs54.cnw.co.nz...
Has anyone developed a general utilitiy that imports text files and maps them to a target class?
I'm thinking of a mapping tool that allows me to choose the target class and the attributes creates a map to import the delimited text file columns into these specific attributes. Thus I could use these maps over and over again and create new ones as I needed to transfer flat files into my database.

krc

Kevin R. Cook
Indiana/USA
317 251 6977