Creating a data upload page
Since Version 4.0, APEX offers the possibility to create a Data Upload wizard. This wizard is actually a visual representation of SQL Loader. But now you can import data from spreadsheets in a user-friendly way. In this recipe we will show you how easy and powerful this Data Upload wizard can be. We will create a page where a user can upload dealer address data.
Getting ready
Make sure you have access to the app_dealers
table and that you have an .csv
file and an .xls
file with the following layout:
DLR_NAME DLR_ADDRESS DLR_CITY DLR_STATE DLR_COUNTRY_CD
We enclosed two sample files along with this book.
How to do it...
In the Application Builder, click on Create Page.
In the User Interface radio group, select Desktop.
Click on the Data Loading icon.
In the Data Load Definition Name text field, enter a name for the definition, for example,
load_dealers
.In the Table Name listbox, select APP_DEALERS.
In the Unique Column 1 listbox, select DLR_ID and click on Next.
In the next...