Form images to database
My apologies if this subject is covered elsewhere as I tried
several combinations of search words to no avail. I hate to admit
that I have worked this problem, using routines from books and
tutorial web sites rewriting what appears to be simple logic for
several weeks.
The problem. I am trying to use a form to load image files
(jpg) under 80k to an MySQL database while using html, php and
MySQL. The form generated by Dreamweaver does not allow me to
access any file that is not loaded on my hard drive. As I learned
today, it appears to be a Mac thing. I finally ran across input on
another forum that stated/implied that this function does not work
on Leopard. Is this true? If so, is it being addressed in CS3? Is
there a work-around? Before writing this note, I tried running my
form on an old PC laptop and I did not have this problem. This may
be old news.
Heh - I need to renumber my ordered list!
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Murray *ACE*" <[email protected]> wrote
in message
news:[email protected]...
> So, let me rephrase your question, and tell me if I am
correct.
>
> You have a file field in your form. When you locally
preview that page
> containing the form, you want to enter an external path
(not on your hard
> drive) into that field? And you cannot manually enter
this path on the
> Mac, where you can only Browse to the file?
>
> If that's correct, I'm still confused:
>
> 1. Why are you worried about how this functions during
local preview?
> 2. It sounds like you are trying to preview locally and
link to an image
> on the server? Why?
> 2. I'm not at my Mac just now, so I can't test the
functionality of the
> file field on it, but I seem to remember that the Mac
behaves exactly the
> same way as the PC for a file field. Are you sure about
this?
> 3. What is the 'accept="image/*" attribute in the file
field for? There
> is no such attribute for the <input> tag that I
know of.
> 4. If you read the W3C description of the file field you
will see that it
> is intended to be used to select a LOCAL file which is
then intended to be
> uploaded to the server, not to select a server file to
be downloaded to
> the local computer. Am I correct that this is what you
want to do?
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
> ==================
>
>
> "de king" <[email protected]> wrote in
message
> news:[email protected]...
>> The form has a slot supported in the code as:
>> <input type="file" name="userfile"
accept="image/*" value="" /> where
>> ''value'
>> will receive the URL to locate the image on the
server that I want to
>> access.
>> However, the code generates
>> URL - Path to image: ______'slot'______________
|Browse| (button)
>>
>> The code will not allow me to key an address into
the 'slot'. It will
>> only
>> allow me to click on 'Browse' and select an image
from my hard drive. I
>> have
>> used 3 browsers on my Mac w/ Leopard - Firefox,
Opera and Safari with
>> the same
>> result. However, if I run he same logic on my PC
laptop, it works.
>>
>> Therefore, it would appear to me to be a problem
with Dreamweaver - Mac
>> logic
>> or with Mac itself. BUT - it would seem to be
somewhat big news??
>>
>
Similar Messages
-
Retrieving image from database in form 6i
hello all
i'm working on form 6i...
i have uploded images into the database of customers in my application using READ_IMAGE_FILE.. IT IS FINE...
But when i am trying retrieves records into the form.... i'm getting all the data except image... Image field is showing empty..
How can i get image from database to form
can u plz help me.....
thanksWhat data type you used for storing image in database. If it is long raw, then you can place an image item within your data block on form and associate it with the column name. This should populate the image by itself.
Below para is from Forms Help.
Image items can be populated in the following ways:
+1. a fetch from a LONG RAW database column+
An image item in a data block is populated automatically when the end user or the application executes a query in the block. When a fetched image is modified or replaced, Form Builder marks that record as Changed, and the next commit operation saves the new image to the corresponding LONG RAW column in the database.
Note: You cannot write a SELECT statement to select a LONG RAW value INTO an image item.
+2. executing the READ_IMAGE_FILE built-in to read an image from the file system+
+(To dynamically write an image from an image item out to a file, use the built-in procedure WRITE_IMAGE_FILE.)+ -
Not able to download image from database
not able to download image from database am in jdeveloper 11g release 2 am using this example
: http://tompeez.wordpress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-2/
hi am not able to down load my image my jsp xml is
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document title="sms4200.jspx" id="d1">
<af:messages id="m1"/>
<af:form id="f1" usesUpload="true">
<af:panelStretchLayout topHeight="211px" id="psl1" inlineStyle="width:1338px; background-color:Navy;">
<f:facet name="top">
<af:panelHeader text="Sms Intergration Sources" id="ph1">
<f:facet name="context"/>
<f:facet name="menuBar"/>
<f:facet name="toolbar"/>
<f:facet name="legend"/>
<f:facet name="info"/>
<af:panelStretchLayout id="psl2" inlineStyle="height:178px; width:1018px;" topHeight="22px"
endWidth="589px" startWidth="55px" bottomHeight="33px">
<f:facet name="end">
<af:panelHeader text="Office" id="ph2"
inlineStyle="width:900px; background-color:Navy;">
<f:facet name="context"/>
<f:facet name="menuBar"/>
<f:facet name="toolbar"/>
<f:facet name="legend"/>
<f:facet name="info"/>
<af:panelFormLayout id="pfl3" inlineStyle="background-color:Navy;" rows="1">
<f:facet name="footer"/>
<af:inputText label="#{bindings.Name1.hints.label}"
required="#{bindings.Name1.hints.mandatory}"
columns="20"
maximumLength="#{bindings.Name1.hints.precision}"
shortDesc="#{bindings.Name1.hints.tooltip}" id="it2">
<f:validator binding="#{bindings.Name1.validator}"/>
</af:inputText>
<af:inputText
label="#{bindings.LocalUpDirectory1.hints.label}"
required="#{bindings.LocalUpDirectory1.hints.mandatory}"
columns="20"
maximumLength="#{bindings.LocalUpDirectory1.hints.precision}"
shortDesc="#{bindings.LocalUpDirectory1.hints.tooltip}"
id="it3">
<f:validator binding="#{bindings.LocalUpDirectory1.validator}"/>
</af:inputText>
</af:panelFormLayout>
</af:panelHeader>
</f:facet>
<f:facet name="top">
<af:inputText value="#{bindings.IntegrationTypeName1.inputValue}"
label="#{bindings.IntegrationTypeName1.hints.label}"
required="#{bindings.IntegrationTypeName1.hints.mandatory}"
columns="#{bindings.IntegrationTypeName1.hints.displayWidth}"
maximumLength="#{bindings.IntegrationTypeName1.hints.precision}"
shortDesc="#{bindings.IntegrationTypeName1.hints.tooltip}" id="it1">
<f:validator binding="#{bindings.IntegrationTypeName1.validator}"/>
</af:inputText>
</f:facet>
</af:panelStretchLayout>
</af:panelHeader>
</f:facet>
<f:facet name="center">
<!-- id="af_one_column_header_stretched" -->
<af:decorativeBox theme="dark" id="db1" inlineStyle="width:1050px; background-color:Navy;">
<f:facet name="center">
<af:panelGroupLayout layout="scroll" id="pgl3" inlineStyle="background-color:Navy;">
<af:panelStretchLayout id="psl3" inlineStyle="width:1012px; height:502px;"
topHeight="133px" startWidth="0px">
<f:facet name="center">
<af:panelStretchLayout id="psl5" endWidth="659px" startWidth="171px">
<f:facet name="center"/>
<f:facet name="start"/>
<f:facet name="end">
<af:panelGroupLayout layout="scroll" id="pgl2">
<af:inputFile label="Select Image" id="if1" autoSubmit="true"
valueChangeListener="#{ImageBean.uploadFileValueChangeEvent}"/>
<af:commandButton actionListener="#{bindings.CreateInsert.execute}"
text="Restart Load Image Process"
disabled="#{!bindings.CreateInsert.enabled}"
id="cb2"/>
<af:commandButton actionListener="#{bindings.Commit.execute}"
text="Save"
disabled="#{!bindings.Commit.enabled}"
id="cb3"/>
<af:commandButton text="View" id="cb1"
partialSubmit="true"
unsecure="#{ImageBean.downloadButton}"
action="#{image.downloadImage}"
binding="#{image2.downloadButton}"/>
</af:panelGroupLayout>
</f:facet>
<f:facet name="top"/>
</af:panelStretchLayout>
</f:facet>
<f:facet name="start"/>
<f:facet name="top">
<af:panelStretchLayout id="psl4" startWidth="232px" endWidth="296px"
bottomHeight="18px" topHeight="11px">
<f:facet name="bottom"/>
<f:facet name="center"/>
<f:facet name="start">
<af:panelFormLayout id="pfl1" labelAlignment="top">
<f:facet name="footer"/>
<af:inputText label="File from PC to be Transfered" id="it4"/>
</af:panelFormLayout>
</f:facet>
<f:facet name="end">
<af:panelFormLayout id="pfl2" labelAlignment="top" maxColumns="10">
<f:facet name="footer">
<af:inputText value="#{bindings.DocumentName.inputValue}"
label="File Transfered to Database"
required="#{bindings.DocumentName.hints.mandatory}"
columns="50"
rows="1"
maximumLength="#{bindings.DocumentName.hints.precision}"
shortDesc="#{bindings.DocumentName.hints.tooltip}"
id="it5" simple="false">
<f:validator binding="#{bindings.DocumentName.validator}"/>
</af:inputText>
</f:facet>
</af:panelFormLayout>
</f:facet>
<f:facet name="top"/>
</af:panelStretchLayout>
</f:facet>
</af:panelStretchLayout>
</af:panelGroupLayout>
</f:facet>
</af:decorativeBox>
</f:facet>
</af:panelStretchLayout>
</af:form>
</af:document>
</f:view>
</jsp:root>
and my log file is
<ViewHandlerImpl> <_checkTimestamp> Apache Trinidad is running with time-stamp checking enabled. This should not be used in a production environment. See the org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION property in WEB-INF/web.xml
<UIXEditableValue> <_isBeanValidationAvailable> A Bean Validation provider is not present, therefore bean validation is disabled
the method am calling is
public BlobDomain downloadImage() {
FacesContext facesContext = null;
OutputStream outputStream = null;
BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
// get an ADF attributevalue from the ADF page definitions
AttributeBinding attr = (AttributeBinding)bindings.getControlBinding("Documentimage");
if (attr == null) {
return null;
// the value is a BlobDomain data type
BlobDomain blob = (BlobDomain)attr.getInputValue();
try { // copy hte data from the BlobDomain to the output stream
IOUtils.copy(blob.getInputStream(), outputStream);
// cloase the blob to release the recources
blob.closeInputStream();
// flush the outout stream
outputStream.flush();
} catch (IOException e) {
// handle errors
e.printStackTrace();
FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), "");
FacesContext.getCurrentInstance().addMessage(null, msg);
return blob;
}i get this error when clicking the button
error when not able to download image
<BeanHandler> <getStructure> Failed to build StructureDefinition for : sms4200.ImageBean
<UIXEditableValue> <_isBeanValidationAvailable> A Bean Validation provider is not present, therefore bean validation is disabled
Edited by: Tshifhiwa on 2012/06/03 10:53 AM
Edited by: Tshifhiwa on 2012/06/03 10:56 AM
Edited by: Tshifhiwa on 2012/06/03 10:57 AMhi i try to run your sample am geting this error
Error 500--Internal Server Error
oracle.jbo.DMLException: JBO-27200: JNDI failure. Unable to lookup Data Source at context jdbc/HRDS
at oracle.jbo.server.DBTransactionImpl.lookupDataSource(DBTransactionImpl.java:1453)
at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:329)
at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:203)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolConnect(ApplicationPoolMessageHandler.java:600)
at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:417)
at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:8972)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4606)
at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2536)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2346)
at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3245)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:571)
at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:234)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:504)
at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:499)
at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:517)
at oracle.adf.model.bc4j.DCJboDataControl.getApplicationModule(DCJboDataControl.java:867)
at oracle.adf.model.binding.DCDataControl.setErrorHandler(DCDataControl.java:487)
at oracle.jbo.uicli.binding.JUApplication.setErrorHandler(JUApplication.java:261)
at oracle.adf.model.BindingContext.put(BindingContext.java:1318)
at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:247)
at oracle.adf.model.BindingContext.instantiateDataControl(BindingContext.java:1020)
at oracle.adf.model.dcframe.DataControlFrameImpl.doFindDataControl(DataControlFrameImpl.java:1645)
at oracle.adf.model.dcframe.DataControlFrameImpl.internalFindDataControl(DataControlFrameImpl.java:1514)
at oracle.adf.model.dcframe.DataControlFrameImpl.findDataControl(DataControlFrameImpl.java:1474)
at oracle.adf.model.BindingContext.internalFindDataControl(BindingContext.java:1150)
at oracle.adf.model.BindingContext.get(BindingContext.java:1103)
at oracle.adf.model.binding.DCParameter.evaluateValue(DCParameter.java:82)
at oracle.adf.model.binding.DCParameter.getValue(DCParameter.java:111)
at oracle.adf.model.binding.DCBindingContainer.getChildByName(DCBindingContainer.java:2748)
at oracle.adf.model.binding.DCBindingContainer.internalGet(DCBindingContainer.java:2796)
at oracle.adf.model.binding.DCExecutableBinding.get(DCExecutableBinding.java:115)
at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:329)
at oracle.adf.model.binding.DCBindingContainer.evaluateParameterWithElCheck(DCBindingContainer.java:1478)
at oracle.adf.model.binding.DCBindingContainer.findDataControl(DCBindingContainer.java:1608)
at oracle.adf.model.binding.DCIteratorBinding.initDataControl(DCIteratorBinding.java:2542)
at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:2477)
at oracle.adf.model.binding.DCIteratorBinding.getAttributeDefs(DCIteratorBinding.java:3319)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.fetchAttrDefs(JUCtrlValueBinding.java:514)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeDefs(JUCtrlValueBinding.java:465)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeDef(JUCtrlValueBinding.java:541)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeDef(JUCtrlValueBinding.java:531)
at oracle.jbo.uicli.binding.JUCtrlValueBinding$1JUAttributeDefHintsMap.(JUCtrlValueBinding.java:4104)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeHintsMap(JUCtrlValueBinding.java:4211)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.getHints(JUCtrlValueBinding.java:2564)
at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2389)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.internalGet(FacesCtrlAttrsBinding.java:275)
at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:749)
at javax.el.MapELResolver.getValue(MapELResolver.java:164)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at com.sun.el.parser.AstValue.getValue(Unknown Source)
at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:73)
at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.getLabel(LabelLayoutRenderer.java:929)
at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.encodeAll(LabelLayoutRenderer.java:213)
at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.encodeAll(LabeledInputRenderer.java:215)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeFormItem(PanelFormLayoutRenderer.java:1088)
at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.access$100(PanelFormLayoutRenderer.java:50)
at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1604)
at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1523)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeChildren(PanelFormLayoutRenderer.java:420)
at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.encodeAll(PanelFormLayoutRenderer.java:208)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:447)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$1500(PanelGroupLayoutRenderer.java:30)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:734)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:637)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:360)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:879)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1294)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:351)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:316)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2194)
at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer.access$400(RegionRenderer.java:50)
at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer$ChildEncoderCallback.processComponent(RegionRenderer.java:707)
at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer$ChildEncoderCallback.processComponent(RegionRenderer.java:692)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer._encodeChildren(RegionRenderer.java:297)
at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer.encodeAll(RegionRenderer.java:186)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at oracle.adf.view.rich.component.fragment.UIXRegion.encodeEnd(UIXRegion.java:323)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:879)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1294)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:351)
at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:316)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:274)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1277)
at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655)
at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:91)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:399)
at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:350)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1027)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:334)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:232)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: javax.naming.NameNotFoundException: While trying to lookup 'jdbc.HRDS' didn't find subcontext 'jdbc'. Resolved ''; remaining name 'jdbc/HRDS'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:247)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at oracle.jbo.server.DBTransactionImpl.lookupDataSource(DBTransactionImpl.java:1439)
... 190 more
my connection.xml is
<?xml version = '1.0' encoding = 'UTF-8'?>
<References xmlns="http://xmlns.oracle.com/adf/jndi">
<Reference name="HRDS" className="oracle.jdeveloper.db.adapter.DatabaseProvider" credentialStoreKey="HRDS" xmlns="">
<Factory className="oracle.jdeveloper.db.adapter.DatabaseProviderFactory"/>
<RefAddresses>
<StringRefAddr addrType="sid">
<Contents>smsdev</Contents>
</StringRefAddr>
<StringRefAddr addrType="subtype">
<Contents>oraJDBC</Contents>
</StringRefAddr>
<StringRefAddr addrType="port">
<Contents>1521</Contents>
</StringRefAddr>
<StringRefAddr addrType="hostname">
<Contents>localhost</Contents>
</StringRefAddr>
<StringRefAddr addrType="user">
<Contents>hr</Contents>
</StringRefAddr>
<SecureRefAddr addrType="password"/>
<StringRefAddr addrType="oraDriverType">
<Contents>thin</Contents>
</StringRefAddr>
</RefAddresses>
</Reference>
</References>
Edited by: Tshifhiwa on 2012/06/04 2:20 PM -
How to place an image in database and how to retrieve and display it in the front end
how to place an image in database and how to retrieve and display it in the front end
and to place an image in database and retrieve the image from database using xml
please,help me out.Create a table with a Long RAW Datatype column for storing the Image Column Data.
Create the form based on the table , which by defaults the column with LONG RAW atatype to a Image Item.
You can use Forms Built in function READ_IMAGE_FILE to read a Image file stored on the file system in to the image item.
A save on the form saves the image in the Image item in the long raw column. -
Hi All,
I have a table with 3 BLOB columns to store images and a NUMBER type column to store the image id_no. I am using database 10g and Forms 6i
My problem is I recently updated the database from 8i to 10g, and since then I am unable to update or insert the new images in these BLOB columns. When I update the existing image or insert new image record through forms, It does save the changes in existing or new record. But It does not show these images while query the record. and also does not give any error while executing the query in forms.
But while trying to retrive the image from updated records or new record in reports, It throughs the error that image is format is unreadable or currupt.
There wasn't any problem in 8i, i could update the record as many times I wanted or create as many records as needed.
Is anybody have any clue about this problem! Any help in this regard will be highly appriciated.
Thanking you and Best Regards.You should not save an image to database, since it'll make database slow, and difficult to write a web page to load image.
Save an image to specific location, and save image location to database.
Then, use <img> tag to call an image in web page. -
FileNotFoundException Uploading image to database
Hello
I'm trying to upload image to databases, in my server it works perfectly but when i run the application in the hosting appear FileNotFoundException.
This is the part of html file than call to servlet.
<FORM ACTION="http://hosting/servlet/lordcyb3r.Connect">
<center><h4><b>Insert image</b></h4></center><BR><BR>
Name:
<input type="text" class="bginput" name="nombre" value="" size="40"/><BR>
<input type="hidden" name="c" value=""/>
<input type="file" class="bginput" name="image" size="40"/><BR>
Comment:
<input type="text" class="bginput" name="comentario" value="" size="60"/><BR>
<INPUT TYPE="SUBMIT" VALUE="Insert">
</FORM>
This is the get method of Connect servlet
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String nombre = request.getParameter("nombre");
String ruta = request.getParameter("image");
String comentario = request.getParameter("comentario");
try {
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
Connection connection = DriverManager
.getConnection("jdbc:mysql://host/db?user=userid&password=psw");
PreparedStatement ps = connection
.prepareStatement("insert into imagedata values ( ?, ?, ?, ? )");
ps.setString(1, nombre);
ps.setString(2, ruta.substring(ruta.lastIndexOf("/") + 1));
ps.setString(3, ruta.substring(ruta.lastIndexOf(".") + 1));
ps.setString(4, comentario);
ps.execute();
ps = connection
.prepareStatement("insert into image values ( ?, ? )");
File file = new File(request.getParameter("image"));
InputStream is = new FileInputStream(file); // LINE 86 <--- HERE IS THE EXCEPTION
ps.setString(1, nombre);
ps.setBinaryStream(2, is, (int) file.length());
ps.execute();
is.close();
connection.close();
out.println("<br><br>Imagen insertada con �xito");
} catch (InstantiationException e) {
out.println("<br><br>InstantiationException");
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
out.println("<br><br>IllegalAccessException");
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ClassNotFoundException e) {
out.println("<br><br>ClassNotFoundException");
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e1) {
out.println("<br><br>SQLException");
// TODO Auto-generated catch block
e1.printStackTrace();
This is the StackTrace.
java.io.FileNotFoundException: G-Natalia Duque.jpg (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at lordcyb3r.Connect.doGet(Connect.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:95)
at com.caucho.server.http.Invocation.service(Invocation.java:291)
at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:339)
at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:268)
at com.caucho.server.TcpConnection.run(TcpConnection.java:136)
at java.lang.Thread.run(Thread.java:602)
Can you help me?
I think so the method is searching the image in the server and no in the client.
If is this, How can i do it works?
Thanks for your help.to upload the file basic thump rule is the form type is multipart form data and method should be post.
u have to use any upload component to upload the file from the client machine to the server and then u have to upload it to the database
baiju -
Storing jpg or gif images in database
Hi,
I want to store the images from system folder to database.
Ex: "c:/images"
is the foldername
I want to access this folder from JSP and want to store a selected image from the user to database and getting back that image to view by a query. so how can i achive this.....Hi All,
I have 2 things to discuss in this thread.
First to store Images in Database: We can store Images as Binary content in the Database with the Datatype as BLOB. This is possible in ORACLE. I am not sure what the Datatype is in other RDBMS. Please refer to Vendor documentation. After storing, the content can be retrieved and displayed in the pages as image resources using a Servlet. The Servlet will only render the content of the Image.
Second to load Images from User's Systems folder: Why do you have such a requirement? Even then, you need to use any common techniques like Multipart form to upload the specific image file to the Server. Kindly read Oreilley's Multipart Request Form Object example for implementation.
Thanks and regards,
Pazhanikanthan. P -
How to store images in database and retrieve them back to page?
Well I don't know how to store an image file to a database (say MSSQL) from the JSP and retrieve it back whenever needed and put it on the JSP page? Please help me.
I am not sure how to store images in database but what you can do is store the image into particular folder using FileOutputStream and its unique name into the database...and than retrieve it from the folder using that name retrieved from database...
<%
response.setContentType("text/html");
response.setHeader("Cache-control","no-cache");
String err = "";
String lastFileName = "";
String contentType = request.getContentType();
String boundary = "";
final int BOUNDARY_WORD_SIZE = "boundary=".length();
System.out.println("contentType --> "+contentType);
System.out.println("BOUNDARY_WORD_SIZE --> "+BOUNDARY_WORD_SIZE);
if(contentType == null || !contentType.startsWith("multipart/form-data"))
err = "Ilegal ENCTYPE : must be multipart/form-data\n";
err += "ENCTYPE set = " + contentType;
else
boundary = contentType.substring(contentType.indexOf("boundary=") + BOUNDARY_WORD_SIZE);
System.out.println("boundary --> "+boundary);
boundary = "--" + boundary;
try
ServletInputStream sis = request.getInputStream();
byte[] b = new byte[1024];
int x=0;
int state=0;
String name=null,fileName=null,contentType2=null;
java.io.FileOutputStream buffer = null;
while((x=sis.readLine(b,0,1024))>-1)
System.out.println("************ x ********** "+x);
String s = new String(b,0,x);
System.out.println("************ s ********** \n"+s);
if(s.startsWith(boundary))
state = 0;
System.out.println("name="+name);
System.out.println("filename="+fileName);
name = null;
contentType2 = null;
fileName = null;
else if(s.startsWith("Content-Disposition") && state==0)
System.out.println("-- 1 --");
state = 1;
System.out.println("s.indexOf(filename=) --> "+s.indexOf("filename="));
if(s.indexOf("filename=") == -1)
name = s.substring(s.indexOf("name=") + "name=".length(),s.length()-2);
System.out.println("after name substring 1 "+name);
else
name = s.substring(s.indexOf("name=") + "name=".length(),s.lastIndexOf(";"));
System.out.println("after name substring 2 "+name);
fileName = s.substring(s.indexOf("filename=") + "filename=".length(),s.length()-2);
System.out.println("fileName --> "+fileName);
//String fileName1 = s.substring(s.indexOf("filename=") + "filename=".length(),s.length());
//System.out.println("fileName1 -->"+fileName1);
if(fileName.equals("\"\""))
fileName = null;
else
String userAgent = request.getHeader("User-Agent");
System.out.println("userAgent --> "+userAgent);
String userSeparator="/"; // default
if (userAgent.indexOf("Windows")!=-1)
System.out.println("test --> "+"\\");
userSeparator="\\";
if (userAgent.indexOf("Linux")!=-1)
userSeparator="/";
System.out.println("userSeparator "+userSeparator);
System.out.println("fileName before inserting userSeparators "+fileName);
fileName = fileName.substring(fileName.lastIndexOf(userSeparator)+1,fileName.length()-1);
System.out.println("fileName after userSeparators "+fileName);
if(fileName.startsWith( "\""))
fileName = fileName.substring( 1);
name = name.substring(1,name.length()-1);
System.out.println("name 2 --> "+name);
System.out.println("final file name "+fileName);
if (name.equals("file"))
if (buffer!=null)
buffer.close();
lastFileName = fileName;
buffer = new java.io.FileOutputStream("/Documents and Settings/sunil/Desktop/images/"+fileName);
else if(s.startsWith("Content-Type") && state==1)
System.out.println("-- 2 --");
state = 2;
contentType2 = s.substring(s.indexOf(":")+2,s.length()-2);
System.out.println("contentType2 --> "+contentType2);
else if(s.equals("\r\n") && state != 3)
System.out.println("-- 3 --");
state = 3;
else
System.out.println("-- 4 --");
if (name.equals("file"))
System.out.println("Final x :: "+x);
buffer.write(b,0,x);
} // while closing
sis.close();
buffer.close();
}catch(java.io.IOException e)
err = e.toString();
boolean ok = err.equals("");
if(!ok)
out.println(err);
else
%>
<SCRIPT language="javascript">
history.back(1);
alert('Uploaded <%=lastFileName%>');
window.location.reload(false);
</SCRIPT>
<%
out.println("done");
%>
</BODY>
</HTML>
I think it will solve ur problem.. -
Retieving image from database using webutil
dear member
i have 10g db release2, with forms 10g
i have saved image of the product in a table
prod_id varchar2(50)
prodlogo blob(4000)
how can i retrieve this prodlogo of product on form using webutil or is there any other way of retrieving image.
thanks.
teefu.
lahore,pakistanHi
You can retrieve the image from the database into a Forms image item, then use client_write_image_file to write this out to the client PC.
rgds
Tony -
Storing Images in Database using ADF/UIX
Hello,
Please let me know of any exmaples or tutorials on how to use Oracle Intermedia to store Images in Database and retrieve the images and display them on UIX.
I tried using declarative approach of using ADF input form for the table which contains a blob column.
In the entity object, i changed the blob column type to OrDImageDomain. I changed the Form settings to POST and UsesFileUpload attribute to True.
I got an error "Incompatible Types" when trying to insert a row in the database table.
Please provide suggestions/comments
Thanks a lot.Now I'm using OrdFileUploadManager and i'm getting an error message as,
VB_Pbefore (The system cannot find the file specified. )
Pbefore is the attribute name of the view object.
The form that i'm using to insert the row in the database is,
<labeledFieldLayout>
<contents>
<messageChoice model="${bindings.Pid1}">
<contents childData="${bindings.Pid1.displayData}">
<option model="${uix.current}"/>
</contents>
</messageChoice>
<messageChoice model="${bindings.Rno1}">
<contents childData="${bindings.Rno1.displayData}">
<option model="${uix.current}"/>
</contents>
</messageChoice>
<messageFileUpload model="${bindings.Pbefore}">
<end>
<media model="${ctrl:createMediaModel(bindings.Pbefore,'ReoAppModuleLocal')}"/>
</end>
</messageFileUpload>
<messageFileUpload model="${bindings.Pafter}">
<end>
<media model="${ctrl:createMediaModel(bindings.Pafter,'ReoAppModuleLocal')}"/>
</end>
</messageFileUpload>
<messageStyledText/>
<submitButton text="Submit"/>
<submitButton text="Confirm Repair Photos" model="${bindings.Commit}" id="Commit2" event="action"/>
</contents>
</labeledFieldLayout> -
RE: Images from Database into W
I've found that a good way to store images was not in the database, but
in files on the server in GIF format and then store the filenames in the
database. That way you avoid the BinaryData mess, the cursor
requirement for blobs, and can store in a compressed form..
You just have the service read in the image from the data file and pass
it back to the requestor, if I remember right.. Also nice because the
same GIF files can be used in normal HTML web pages..
-Greg
Greg Nyberg, Senior Consultant
BORN Information Services Group
(612) 404-4217 Fax: (612) 404-4440
<[email protected]>
From: Brendan Duddridge[SMTP:[email protected]]
Sent: Monday, April 28, 1997 12:28 PM
To: Forte ListServe
Subject: Images from Database into W
TransCanada PipeLines P.O. Box
1000, Station
M
Calgary,
Alberta, T2P
4K5
Telephone:
(403)
267-6100
FAX: (403)
267-6444/5/6
Corporate Head Office
Reply: Images from Database into Web SDK 1.1 page
Hi,
I want to be able to read images in from a database and have Forte
generate a web page with those images.
Does anyone know what the MIME type would be for a Forte ImageData
object? Do I have to store the images into the database in gif format
or is there some other MIME format that Forte uses to store ImageData
objects. Also, can Netscape or Internet Explorer read those images?
Here is the ReturnImage page builder method I created:
=============================================================
Response : HTTPResponse = new();
LUIObject_ID : Integer;
LUIObject_TD : TextData = new();
aLUIObject : LUIObject;
aBinaryData : BinaryData = new();
aStream : MemoryStream = new();
// Retrieve LUIObject_ID from http parameters
LUIObject_TD = pRequest.FindNameValue('LUIObject_ID');
LUIObject_ID = LUIObject_TD.IntegerValue;
// Retrieve aLUIObject for the specified LUIObject_ID from the
database.
// This object contains various ImageData attributes which contain the
// icons to display on the web page.
aLUIObject = SODIInfraSOMgrSO.SelectLUIObject(LUIObject_ID);
aBinaryData.SetAllocatedSize(aLUIObject.ClosedLargeIconSize);
aStream.Open(accessMode = SP_AM_READ_WRITE, isBinary = TRUE);
aStream.WriteSerialized(object=aLUIObject.ClosedLargeIcon);
aStream.Seek(0);
aStream.ReadBinary(target = aBinaryData);
// Not sure what MIME type to specify here for ImageData objects
// read in from a database. Any ideas??????????
Response.AssignBinaryResponse(aBinaryData, 'image/x-bitmap');
return Response;
===============================================================
Thanks,
Brendan DuddridgeHello Denis Segard,
I also try the same method and I use OLE container to store the images into database in Oracle forms 6i.
But, if i try to retrieve the images in report i got that error.
Anyway i store the images into the database but why i shouldn't retrieve it in reports and i can retrieve the images in forms
Is there any problem in my design.
Is there any other easy way to store the images into database in oracle forms 6i...
Waiting 4 ur reply!!!!!!!!
Edited by: Janarthan on Aug 19, 2011 12:36 AM
Edited by: Janarthan on Aug 19, 2011 12:39 AM -
Error while Creating form on remote Database
Hi All
I m getting error while creating form on remote database thru
Database link
Line/Column Error
7099/21 PLS-00454: with a returning into clause, the table
expression cannot be remote or a subquery
7099/9 PL/SQL: SQL Statement ignored
7749/16 PLS-00454: with a returning into clause, the table
expression cannot be remote or a subquery
7749/9 PL/SQL: SQL Statement ignored
and statement at line specified is insert statement. and at end
of insert statement Returning caluse is there as follows
RETURNING ROWID INTO "_ROWID";
This returning clause is causing error. Does anybody knows how
to handel it??
Thanks
YogeshYogesh
I haven't seen the ora-03116 problem.
What version of Portal are you running? Are the databases at the same version? Does your table have longs or anything strange in it?
Can you query the table via the synonyms and link in sqlplus as the application schema? This is a good test because it eliminates Portal.
You should try setting up synonyms etc for the emp table. If you still get the problem then Oracle may be able to replicate it. If not, then there's sth funny about your table maybe.
I agree with Vishnu about creating everything in sqlplus. I create all my links and synonyms in sqlplus. They are all public. I have 2 synonyms: one takes you over the link the other takes you to the right schema. It's flexible and it works.
data database: D grants to P (local schema) on table T
public syn T = D.T (sys) (get the right schema)
portal dbase : public db link to data database connecting as P
public syn T = T@dblink (sys) (over the link)
P is a schema created in both databases.
Test is: P in portal dbase can "select * from T" and gets the right data.
I never, ever refer to a schema when defining a form. ie. never P.T or D.T or whatever. I always refer simply to a synonym. For the above my form would be defined simply on the table T.
Hope this helps
Greg -
Error while getting image from database in SUP using ios?
Hi All,
Im developing native iOS application using sup 2.1.3 . Im getting error While retrieving image from SUP database. Here i'm trying to get image from database and show in imageView.can any one help me how to fix this issue?
In database image datatype is 'LONG Binary' .
My table Schema:
CREATE TABLE dba.ImagesTable (
RowID INT NOT NULL,
ImageName VARCHAR(20) NOT NULL,
PhotoData LONG BINARY NOT NULL,
IN SYSTEM
ALTER TABLE dba.ImagesTable
ADD CONSTRAINT ASA137 PRIMARY KEY CLUSTERED (RowID)
ALTER TABLE dba.ImagesTable
ADD CONSTRAINT ASA138 UNIQUE NONCLUSTERED (RowID)
in Xcode:
[SUP107SUP107DB synchronize];
SUP107ImagesTable *imgTable =[[SUP107ImagesTable alloc]init];
SUP107ImagesTableList *list =[SUP107ImagesTable findAll];
SUP107ImagesTable * oneRecord =[list objectAtIndex:0];
NSLog(@"rowId:%d---imageName:%@---photoData:%@---photoLenght:%d",oneRecord.rowID,oneRecord.imageName,oneRecord.photoData,oneRecord.photoDataLength);
NSData *tempData =[[NSData alloc]init];
SUPBigBinary *responseBinaryData = (SUPBigBinary *)oneRecord.photoData.value;
@try {
[responseBinaryData openForWrite:[oneRecord.photoData length]];
[responseBinaryData write:tempData];
@catch (NSException *exception) {
NSLog(@"exception: %@",[exception description]);
UIImageView *imgView =[[UIImageView alloc] initWithFrame:CGRectMake(50,50,100,100)];
[self.window addSubview:imgView];
UIImage * tempImage =[UIImage imageWithData:tempData];
imgView.image = tempImage;
[responseBinaryData close];
Error Log:
2014-04-02 18:42:15.150 SUP102[2873:70b] rowId:1---imageName:Apple---photoData:SUPBigBinary: column=c pending=1 allow_pending_state=1 table=sup107_1_0_imagestable mbo=0x0 key=(null) ---photoLenght:90656
Printing description of responseBinaryData:
<OS_dispatch_data: data[0xc891b40] = { leaf, size = 90656, buf = 0x1213a000 }>
2014-04-02 18:42:33.304 SUP102[2873:70b] -[OS_dispatch_data openForWrite:]: unrecognized selector sent to instance 0xc891b40
2014-04-02 18:42:33.305 SUP102[2873:70b] exception: -[OS_dispatch_data openForWrite:]: unrecognized selector sent to instance 0xc891b40
2014-04-02 18:42:33.305 SUP102[2873:70b] -[OS_dispatch_data close]: unrecognized selector sent to instance 0xc891b40
2014-04-02 18:42:33.306 SUP102[2873:70b] [ERROR] [AppDelegate.m:497] NSInvalidArgumentException: -[OS_dispatch_data close]: unrecognized selector sent to instance 0xc891b40This thread talks about uploading image to SAP from a IOS device,Sending Image to SAP via iOS Native app (SUP 2.1.3)
Midhun VP -
Is it possible to save an Oracle Form in the database? I have some forms thah require checking to see if they access various tables. I'd like to load the forms into the database and query the forms metadata, but not being a forms person I'm not sure if this is possible.
Any information would be helpful.
Many Thanks
PaddyVersion? (http://blogs.oracle.com/shay/2007/03/02)
This is an article from Metalink:
Subject: Oracle Forms in Applications FAQ
Doc ID: Note:177610.1 Type: FAQ
Last Revision Date: 28-FEB-2006 Status: PUBLISHED
Can you save Form modules (FMB, MMB, PLL) into the database?
Yes and no. Yes if its standalone and no if its part of Apps, this is because Apps forms are structured so that their dependent modules are all stored as files. In Forms 9i (not yet released) you will not be able to store Forms modules in the database altogether. -
How can i retrieve documents(e.g .doc,.pdf, .txt etc) using forms from the database.
i inserted the documents using sql*loader, below is the control and data files.
-- control file
LOAD DATA
infile 'load.txt'
INTO TABLE husman
APPEND
FIELDS TERMINATED BY ','
(id integer external,
fname FILLER CHAR(50),
docu LOBFILE(fname) TERMINATED BY EOF)
--data file
1,../husman/dell.doc,
2,../husman/me.pdf,
3,../husman/export.txt,
in the form i have a text field to display the id and an OLE container to display the document as an icon. but when i execute query, i only get the id number and not the document.
any help will be appreciated.
Thanks
Hussein SaigerStep by step
1. Erase all contents and settings
2. You'll be asked twice to confirm
3. You'll see Apple logo and progress bar
4. You'll see a big iPad logo on screen
5. Configuration start
6. Set language
7. Set country
8. Enable Location Service
9. Select network, enter password and join network
10. You'll be given 3 options (a) Setup as New iPad (b) Restore from iCloud Backup (c) Restore from iTune Backup
11. Selected Restore from iCloud Backup
12. You'll be required to enter Apple ID and Password
13. Agree to Terms and Conditions
14. Select Backup file
15. You'll see progress bar
16. Red slider will appear; slide to unlock; step #1 to #16 is fast
17. Pre-installed apps will be restored first
18. Message: Purchased apps and media will now be automatically downloaded
19. You'll see a pageful of apps with Waiting/Loading/Installing
20. Message: Some apps cannot be downloaded, please sync with computer
Maybe you are looking for
-
Voice memos won't transfer to iTunes?
I have an iPhone 5 that I recorded three voice memos on. They are pretty long, about an hour or a little more each. I've transferred audios longer than this to this same computer before (Macbook Pro), but it won't work now. I know the Include Voice M
-
Help,how close pop-up window ,and open another view
Hello, How click the pop-up window button ,then close the pop-up window . At the same time open another VIEW,and transfer PO number to the VIEW. thanks
-
I have EPUB Creation problems when I use my InDesign CS 5.5 document from my first EPUB book, as a template to create my other two EPUB books. My customer gave me a job that forced me to learn how to do EPUBs – and I'm still learning. I created thre
-
I just bought mac mini 2.3ghz i5. 2 weeks ago i can't run the game uber strike. Already install and uninstall that game but still cann't run t, he game. Before that everything is fine. I think i need to install new Lion OS. But can some one tell me
-
Licensing for this product has stopped working - Acrobat 9 Pro Trial Edition
Before committing to purchase of 50 licenses for the office, I though I'd better make sure Acrobat 9 Pro works on my laptop. Nyet I am totally frustrated by spending 20 minutes installing the package, only to get a "licensing for this product has sto