Jump to content


Photo
- - - - -

Using BLOB's In SQL Server With ProIV


15 replies to this topic

#1 Ross Bevin

Ross Bevin

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 226 posts
  • Gender:Male
  • Location:Manzanillo, Colima, Mexico

Posted 12 February 2013 - 08:57 PM

Hi there,

I have been asked by my client if we can store and retrieve SQL Server BLOB data types (PDF, Word, Excel, image documents) in ProIV yet. Before saying the obigatory no I thought I would check. Is there any plan to enhance ProIV to manage BLOB's. Or, does anyone out there currently manage BLOB's in ProIV using purely SYS-SQL calls? I would be interested to hear about any successful methods people are using within a ProIV environment.

Regards
Ross Bevin

#2 Matthews Estrice

Matthews Estrice

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 241 posts
  • Gender:Male
  • Location:Henley-on-klip

Posted 13 February 2013 - 08:32 AM

Hi Ross,

I think using SSO will be your solution to your problem since PROIV supports JAVA.

We have written Java servlets and JSPs to handle BLOBs and CLOBs.They are deployed on PROIV version 7.We then call the page within PROIV.

We have tested our BLOB/LOB and CLOB on PROIV 7 and JAVA SERVER SIDE PROGRAMMING,they work fine.We call a url within Aurora to display the BLOB within PROIV.

I hope you have seen our example picture on the following link:-

http://www.proivrc.c...h__1#entry18003

(No cut and paste :p/> ).

I have spent my life trying to use PROIV data types in displaying BLOBs on the PROIV fields,no luck.

Writing a java class and zip it in the .jar file and place the .jar file under the SSO (library) directory and call the Object within PROIV can be your gateway also.

These are just my solutions in using BLOB in PROIV.

Matthews Estrice
ProInvest Software

#3 Marlon

Marlon

    Member

  • Members
  • PipPip
  • 29 posts
  • Gender:Male

Posted 14 February 2013 - 10:33 AM

Hi Ross,
Are you doing this in open client / Aurora or MFC?

Marlon

This is your captain speaking. We may experience some slight turbulance and then...explode.


#4 Ross Bevin

Ross Bevin

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 226 posts
  • Gender:Male
  • Location:Manzanillo, Colima, Mexico

Posted 14 February 2013 - 03:51 PM

Hi Matthews,

Thanks for your reply. Just to be clear are you using your Java solution solely through the SSO interface? If so would you be interested in selling the solution to us for internal use? Please e-mail me directly if you are.

Thanks

Ross

#5 Ross Bevin

Ross Bevin

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 226 posts
  • Gender:Male
  • Location:Manzanillo, Colima, Mexico

Posted 14 February 2013 - 03:54 PM

Hi Marion,

Was you question meant for Matthews or me? We run with the MFC but will deploy some OC in the future.

Regards

Ross

#6 Matthews Estrice

Matthews Estrice

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 241 posts
  • Gender:Male
  • Location:Henley-on-klip

Posted 14 February 2013 - 06:27 PM

Hi Ross,
We will email you the code and test the code with you.Have you populated the excel spreadsheets and pictures into your database tables already?
I am hoping to see NGA coming up with standard supported version soon packaged in their domain SSO package name.
Can you drop me an email on matthewse@hotmail.com cc info@proinvestors.co.uk please.

Matthews

#7 Matthews Estrice

Matthews Estrice

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 241 posts
  • Gender:Male
  • Location:Henley-on-klip

Posted 14 February 2013 - 07:02 PM

Ross wrote:-"Just to be clear are you using your Java solution solely through the SSO interface?"
My answer is:- We write server Java code using servlets and JSP and deploy the code on ANY web or application java compatible container.We can also register the JAVA servlets on web.xml under Jetty application server.
We can also package our code as a .jar or a .war files and deploy them under the SSO folder and call the package code in PROIV function.We use Netbeans IDE and NGA uses Eclipse IDE,both IDEs create the JAVA code that is deployable under PROIV.
We deploy our same Java code under various application server under such as SAP Netweaver,tomcat,JBoss,and PROIV ver7 server now.
If you visit my 'Gallary' under www.proinvestors.co.uk,you will pictures of server code we wrote the last 2 years and reuse the same code under PROIV because the code is portable.NGA does not support these codes ofcourse,we do.

We have JAVA code that stores docs and pics and retrieve the excel and pics stored in the database and display the pics and excel spredsheet docs under PROIV application server.

Matthews

#8 Matthews Estrice

Matthews Estrice

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 241 posts
  • Gender:Male
  • Location:Henley-on-klip

Posted 14 February 2013 - 07:11 PM

Ross wrote:-"Just to be clear are you using your Java solution solely through the SSO interface?"
My answer is:- We write server Java code using servlets and JSP and deploy the code on ANY web or application java compatible container.We can also register the JAVA servlets on web.xml under Jetty application server.
We can also package our code as a .jar or a .war files and deploy them under the SSO folder and call the package code in PROIV function.We use Netbeans IDE and NGA uses Eclipse IDE,both IDEs create the JAVA code that is deployable under PROIV.
We deploy our same Java code under various application server under such as SAP Netweaver,tomcat,JBoss,and PROIV ver7 server now.
If you visit my 'Gallary' under www.proinvestors.co.uk,you will pictures of server code we wrote the last 2 years and reuse the same code under PROIV because the code is portable.NGA does not support these codes ofcourse,we do.

We have JAVA code that stores docs and pics and retrieve the excel and pics stored in the database and display the pics and excel spredsheet docs under PROIV application server.

Matthews

#9 Matthews Estrice

Matthews Estrice

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 241 posts
  • Gender:Male
  • Location:Henley-on-klip

Posted 14 February 2013 - 09:31 PM

Hi Marlon,
I can still call the same Java code with MFC using Browser ActiveX control on Proiv V6 to display BLOB on the function but using JBoss or Tomcat.The ActiveX did seem to be converted to Ajax script in Proiv version 7 the last time I tested the ActiveX control on version 7.

You can also call the url within the logic,it displays a separate page.

Matthews

#10 Marlon

Marlon

    Member

  • Members
  • PipPip
  • 29 posts
  • Gender:Male

Posted 18 February 2013 - 10:23 AM

Hi Marion,

Was you question meant for Matthews or me? We run with the MFC but will deploy some OC in the future.

Regards

Ross


Hello Ross,
The question was directed at you. We have a solution for MFC that uses a viewing .exe placed in the prog directory. If you need that solution, let me know and I'll send you the ProIV code. One of our guys wrote the .exe so I need to talk to our head honcho about costs if you wanted that.

Regards,
Marlon

This is your captain speaking. We may experience some slight turbulance and then...explode.


#11 Marlon

Marlon

    Member

  • Members
  • PipPip
  • 29 posts
  • Gender:Male

Posted 18 February 2013 - 10:28 AM

Hi Marlon,
I can still call the same Java code with MFC using Browser ActiveX control on Proiv V6 to display BLOB on the function but using JBoss or Tomcat.The ActiveX did seem to be converted to Ajax script in Proiv version 7 the last time I tested the ActiveX control on version 7.

You can also call the url within the logic,it displays a separate page.

Matthews


Hi Matthew,
Thanks for your reply.

I know I can call a URL from within logic (we do that to open another application from within out application), what I was wondering was what is on the URL, i.e. how do you formulate a page on the fly to display the blob?

Regards,
Marlon




This is your captain speaking. We may experience some slight turbulance and then...explode.


#12 Matthews Estrice

Matthews Estrice

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 241 posts
  • Gender:Male
  • Location:Henley-on-klip

Posted 18 February 2013 - 11:25 AM

Hi Marlon,
The Server Side Object is located under a servlet containor ie. Jetty under proiv version 7.If you execute the Servlet/JSP with JDBC/ODBC connection using a URL in proiv V7 of which it supports J2SE,the file is displayed on the web page automatically.Some web browser like Firefox ask you to save the file or save on your computer.With IE browser,the file is displayed on the web browser as an JPG or GIF pictures.CLOBs require a special editors eg. Word Document,Excel,html,PDF installed on your computer to be displayed on the url.

The code is under the web/application server on the server.

PDF files are tricky since the have security,signatures,cascade stylsheets,and different LAYERS.PDFs as CLOB data types,have different layers,you can see how is the iText API being programmed Lowagie.You have stylesheet,jpeg,html,xml etc. content types involved in building a PDF file.

Retrieving a BLOB from the database using server side code is a same as placing an file under the web server and calling the file via the Url.

Matthews

#13 Marlon

Marlon

    Member

  • Members
  • PipPip
  • 29 posts
  • Gender:Male

Posted 19 February 2013 - 09:38 AM

Hello Matthew,
Thanks for that. We'll give it a go and see how we get on.



This is your captain speaking. We may experience some slight turbulance and then...explode.


#14 Matthews Estrice

Matthews Estrice

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 241 posts
  • Gender:Male
  • Location:Henley-on-klip

Posted 27 February 2013 - 07:59 PM

Hi Ross,
I can store and retrieve all kind of files on the database.PDF files are difficult type of file to handle since they are binary files,but I have managed to get them into and from the database on the web application.The solution we have is pretty fast in implementing.You don't need to handle the content type 'application/pdf'.We handle PDF file using setContentType as file.CSVs,images,jpg,videos clips all get stored and retrieve on the DB.I tested using Firefoxe,Safari and IE9.We don't have a problem of taking care of the escape characters and whitespaces.Why I am mentioning this is because these are the issues I have encounters.

I can filter on the SQL to select a BLOB or CLOB file I want to download.I can upload more than one BLOB file for the record,which means that I can have several documents and pictures that are related to that record or transaction attached into that record in the database.

Matthews

#15 Ross Bevin

Ross Bevin

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 226 posts
  • Gender:Male
  • Location:Manzanillo, Colima, Mexico

Posted 27 February 2013 - 11:29 PM

Hi Matthews,

Glad to hear you have the PDF BLOB part working with your SSO. Do you have any plans to sell this solution to the ProIV community?

Regards
Ross



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users