Skip to main content

Hi Community,

Please can someone provide me with the PL/SQL or C# code to upload or check in a document into IFS APP10.

Thanks very much in advance.

Hi @GLEEMMANUELP ,

 

Please check the forum post https://community.ifs.com/technology-all-about-the-nuts-and-bolts-that-make-it-work-50/create-new-document-with-empty-file-865#post3426

It has a complete script to create document revision, check-in and attach to Inventory Part. Hopefully it could work for you.. Requirement in that thread to create an empty document. You need to uncomment EDM_FILE_STORAGE_API.Write_Blob_Data (objversion_,objid_ ,file_data_ );

to get the fully functional script.

 

Good Luck!

  


Hi DSJ,

Thanks very much for your reply.

That code is helpful, but what modification should I make to load a real document like a “.PDF” and not an empty one. 

I assume that, the document is empty because the BLOB variable “FILE_DATA_” is empty.

So which function/API should I use to get it  from a given file on my desktop for example?

 

Thanks again in advance.


Hi DSJ,

Thanks very much for your reply.

That code is helpful, but what modification should I make to load a real document like a “.PDF” and not an empty one. 

I assume that, the document is empty because the BLOB variable “FILE_DATA_” is empty.

So which function/API should I use to get it  from a given file on my desktop for example?

 

Thanks again in advance.

Hi @GLEEMMANUELP ,

Yes, you need to have the file as as BLOB into FILE_DATA_.

There are many options to load the file to oracle database and the best approach depends on your requirement.

If you want the file to load from user PC, and need to have a user interface, then you can use create a .NET or Java application to load the file and use Access Provider to execute IFS code.

Otherwise there are several options in Oracle on how to load a file. See the below document to get an idea.

 https://blogs.oracle.com/searchtech/loading-documents-and-other-file-data-into-the-oracle-database

 

Cheers!

Damith


That worked fine.

 

Thanks very much Damith.


@GLEEMMANUELP, which approach did you go for, to read in the file? I have successfully used UTL_FILE as well, but the way described in the article above might be using a more “modern” way.

 


Reply