• JDELIST is celebrating its 20 year anniversary today!
  • Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

How to insert blob content into F00165 via SQL from SQL server to Oracle database

xxpeta

Active Member
Hi All,
we have some pdf files stored on SQL server in BLOB field and I need your help with insert this BLOB field to F00165 (Oracle database) via SQL. Program for copying from SQL server to Oracle database is written in C#. Thanks for your help. Petr
 

BOster

Legendary Poster
Hi All,
we have some pdf files stored on SQL server in BLOB field and I need your help with insert this BLOB field to F00165 (Oracle database) via SQL. Program for copying from SQL server to Oracle database is written in C#. Thanks for your help. Petr
I don't think you would want to try and insert PDF files directly to F00165 via SQL. IMO, you really should use the JDE media attachment APIs for this or a third party product. The 3rd party product which you shouldn't have any trouble finding on this site is designed for exactly this use case. If this is a one time thing and you want to do this inside the JDE toolset that should be easy enough as well. There are also JDEBASE APIs for reading BLOB data for your source. I have used them but not with a foreign table. If they don't work with a foreign table you could probably build a virtual table (SQL view with a JDE table definition) over the foreign source table and access the BLOB data that way, then use the JDE attachment APIs to insert into the media objects.
 

xxpeta

Active Member
I don't think you would want to try and insert PDF files directly to F00165 via SQL. IMO, you really should use the JDE media attachment APIs for this or a third party product. The 3rd party product which you shouldn't have any trouble finding on this site is designed for exactly this use case. If this is a one time thing and you want to do this inside the JDE toolset that should be easy enough as well. There are also JDEBASE APIs for reading BLOB data for your source. I have used them but not with a foreign table. If they don't work with a foreign table you could probably build a virtual table (SQL view with a JDE table definition) over the foreign source table and access the BLOB data that way, then use the JDE attachment APIs to insert into the media objects.
The problem is, that E1 is running on AIX and there is no possibility to connect SQL server as foreign table.
 

BOster

Legendary Poster
You could run one process to extract the PDFs from the SQL database to the file system, then run a process in E1 to read from file system and import into E1 Media Objects.
 
Top