KB-51359: Recording data with CSV extension in a database.

Question:

How can data from a *.CSV file be recorded in the database via E3?

Solution:

To do so, you must first make sure E3 can read the *.CSV file. The easiest way to do so is via FileSystemObject object.

The next step is to make the application record the data from the *.CSV in the database; to do so, just create a historic and use WriteRecord method.

To create the historic, you must right-click Database in the Organizer and select Insert historic in PRJ file option. Next, set up the new historic by inserting the necessary variables for storing the desired information, link the historic to a database, and select Generate Table option (in the Historic’s properties).

In the sample application, a button was set up to record data generated by FileSystemObject object (with WriteRecord method, which is in the script). Thus, it will be possible for the user to read the file and save it in the database.

NOTE: The script used to create this connection is in the sample application; to make sure it works properly, you must change the file’s addressing in the button’s script.

Attachments:

Sample.zip

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Leave a Reply

Your email address will not be published.Required fields are marked *