Import text file(.csv, .txt) to MYSQL db in Omnis studio 6 webapp

David Swain dataguru at polymath-bus-sys.com
Mon Aug 26 09:25:09 EDT 2013


Ambrose,

If you must import this data using your Omnis application (for data validation, etc.), then the back end doesn't matter until the very end of the process. You need to import that data to a list (variable), then process the contents of that list (variable), then write the data from the list (variable) to the appropriate columns of the appropriate table(s) in your database using the appropriate DAM. For speed and efficiency, you will probably not want to involve a list display field because it requires extra time and resources to display the contents of the list variable - unless you like to watch, of course. ;-)

The smartlist feature of a list variable may or may not be of use to you. The same goes for pre-defining your list variable from a Schema class. Among other things, it would depend on whether you know what columns are to be imported in advance or you have to determine that from the import file, which might have a header row of column names. In that case, a list defined with a large number of character columns might be the best choice (to preserve those column names) and further determinations of appropriate data types would follow the initial import.

Otherwise, you could just issue a LOAD DATA INFILE command to the MySQL server, which still offers some potential data validation and manipulation possibilities.

I can't help you further on this, but I'm sure there are plenty of people on the list to pick up the slack.

Regards,

David

On Aug 26, 2013, at 6:22 AM, Ambrose Tobon wrote:

> Hi Phil,
>  
> The files are located in a certain folder in the server within the LAN. These  files are generated by another system remotely and are send via email then placed in a folder. My application is to read these files to MYsql database for data validation and verification.
>  
> Required:
>  
> Import these files to MySQL database in Omnis studio 6.0 in a remote form(web app)
> 
> Kind regards,
> 
> Ambrose
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com




More information about the omnisdev-en mailing list