Skip to main content

Posts

Showing posts from 2011

Moving Workspaces from PC to PC

I had an urgent need to move loads of APEX workspaces and schemas in an Oracle XE installation from  a Windows PC(PC1) to another Windows PC(PC2) running windows 7 OS. Stated below are the steps i took after a successfully installation of Apex 4.0 on Oracle 10g XE on PC2 Stop listener and other processes on PC2 Rename the oraclexe home folder on PC2 Copy oraclexe home folder from PC1 to PC2 ensure you maintain existing path Ensure your new tnsnames.ora and listener.ora files contains PC2's host name Restart your listener and other processes Though this might not be best practice but it sure worked for me. Hope you find it helpful

Loading CSV(Comma Delimited Values) document into a Sample Oracle APEX Application

Today i want to show you a way you can load .csv documents into tables in an application. For this session i have a sample application that stores information into this these tables 1.EMP ----these stores a list of Employees 2.BADLOG---this logs errors   3.DOCUMENT_TABLE --this stores the uploaded document(.csv in this case) I want to load a .csv(comma delimited values) document into the EMP table. Note: The document must have matching columns with the table you want to upload into  Steps to take on the application level 1.Create a Page that 'll allow the user to upload the CSV into the document table 2.On the same page or a branched page ensure you call this procedure which must already be in the database /****************************************************************/ procedure document_upload_api  (   p_filename in varchar2,   p_output out varchar2  ) is v_blob_data BLOB;   v_blob_length NUMBER; v_position NUMBER; v_inserted_rows NUMBER:=0; v_