Page 1 of 1

DBPro import wizard

PostPosted: Thu May 31, 2012 9:21 am
by dpayer
Just a small suggestion.

I have begun using DBPro and will import log files into an Access DB for processing. Each line has date and time in it but Access (2007) is picky about format when a field is a DATE/TIME type. When you import into Access there is a wizard that allows you to pick the date format D/M/Y or Y/M/D, etc.

When it imports, it then converts the imported data to its' native format which is D/M/Y (with no leading zeros for days/months - my logs are Y/M/D with leading zeros, ie 05 = May, etc.).

On my first attempt to run the import command, it said my date was an incorrect format but I had imported the same table directly into Access with no problem (with the help of the date wizard). When I opened the log file in Notepad and did a global replace of dates, then saved the file, it imported correctly.

While it would be possible to import the log file (anywhere from 4-80 megs worth) and then do a string search/replace, that causes problems because I need to know precise dates to change.

It would be nice to have a way to indicate the date format that was being presented for importation and then have the DBPro plugin do the required conversion before importing. I know each database has its own format for dates so if this is not possible, I understand. If it is possible, it would be a helpful improvement.

As an alternative I guess it could be imported into a separate table as text, modified in the DB, then copied over to the production table. (whew!)

Thanks for listening.

David P.

PostPosted: Thu May 31, 2012 10:14 am
by Neosoft Support
Hi David,

You might experiment with using dbpSetFieldProperties to set the date field display format before importing your data. If set properly, I think this will correctly interpret the dates as they are imported.

PostPosted: Thu May 31, 2012 10:24 am
by dpayer
Neosoft Support wrote:Hi David,

You might experiment with using dbpSetFieldProperties to set the date field display format before importing your data. If set properly, I think this will correctly interpret the dates as they are imported.


Thanks for the tip. I'm a bit new to DBPro.

David