Error while Image loading from database
I'am using generic handler for loading Image from data bases. Its work fine when when I hardcode the ImageID in QureyString when call Handler. But it's giving errors of different type when I dynamically pass value to qurey string(from datatable).
"There is already an open DataReader associated with this Command which must be closed first."
OR
"There is already an open DataReader associated with this Command which must be closed first."
here is a code of Handler
public void ProcessRequest(HttpContext context)
Int64 id = Convert.ToInt64(HttpContext.Current.Request.QueryString["adid"]);
// dt = obj_dalayer.GetRecpDetailsByID(id);
dt=GetRecpDetailsByID(id);
if (dt.Rows.Count > 0)
//context.Response.ContentType = "image/jpeg";
context.Response.BinaryWrite((byte[])dt.Rows[0][2]);
public DataTable GetRecpDetailsByID(Int64 reid)
try
obj_DB.Open();
obj_sqlcmd = new SqlCommand("GetRecpDetailsByID", obj_DB.GetDBConnection());
obj_sqlcmd.CommandType = CommandType.StoredProcedure;
obj_sqlcmd.Parameters.Add(new SqlParameter("@rid", reid));
obj_sqlda = new SqlDataAdapter();
obj_dt = new DataTable();
obj_sqlda.SelectCommand = obj_sqlcmd;
obj_sqlda.Fill(obj_dt);
return obj_dt;
finally
obj_DB.Close();
And here is a HTML and ServerSide code on ASPX page of call handler.
<img id="img2" alt="Image" runat="server" src='<%#"~/ImageReqHandler.ashx?adid="+Eval("ReID")%>' width="179" height="148" /
I'm using Eval("ReID") to get ID of Image from datatable.
Ayez,
This is the VB forum, try it in the C# form.
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral
However, there they will probably tell you that although your problem is C#, it is ASP.Net some programmers become scared if it is Web you know.
Success
Cor
Similar Messages
-
Jasper report on HTML when one image loaded from database and for the other
How to generate jasper report on HTML when one image loaded from database and for the other we give a image path
My code
ByteArrayOutputStream baos = new ByteArrayOutputStream();
exporter = new JRHtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, strImageInputDirectory);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, strImageOutputPath == null ? "." : strImageOutputPath);
exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.TRUE);
exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE);
exporter.setParameter(JRHtmlExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
exporter.exportReport();
byte[] bdata = ((ByteArrayOutputStream) baos).toByteArray();
Can any one help pls
Message was edited by:
ameet.auhey sorry for posting it in this forum.
but do u have sample code for making it work.. since i am able to do it on PDF format(image from Database and another stored in the webserver) using
byte image[] =(byte[]) outData.get("image");
ByteArrayInputStream img = new ByteArrayInputStream(image);
hmimg.put("P_PARAMV3", img);
print = JasperFillManager.fillReport(reportFileName, hmimg, jrxmlds);
bdata= JasperExportManager.exportReportToPdf(print); -
Getting error while scheduling load from one cube to another
Hi,
I have create one cube ,which has got loaded from two data sources and load into the cube went successful.I have created copy cube and schedule the load into copy cube from the base cube,where i am getting error message syaing that"New work Area started,terminated the system" and "Core_dump","Rolled-Out session terminated" all the above messages are getting and so many short dumps.I am getting all the above messages.
Even i have change data packet size from 20000 to 5000 and increares dialup process from 2 to 5.But still i am getting same kind of messages.
Please some one can help me out from this issue.Hi,
In which version you are.
If you in 7.0 then have you checked in DTP.
Just logooff from your server, and again relog, and try to load once again.
Let us know status ....
Reg
Pra -
OBIEE Error while importing table from database
Hi
I am getting the following error when i am trying to import table from database.
[nQSError: 16001]ODBC error state: IM004 code:0 message:
[Microsoft][ODBC Driver Manager] Driver`s SQLAllocHandle on SQL_HANDLE_ENV failed.
Any idea y such error.
Thanks and Regards,
AndyLooks like an error in the ODBC driver, not OBIEE as such.
Have you tried googling it?
Can you post details about your OS and DB. -
Error while re-loading from PSA..!
Hi All,
I have deleted request from Infocube which was aggregated.
I was trying to reload the same request from PSA, i am getting the following error:
SID 163.687 is smaller than Rollup SID of Cube
0PCA_C01; No request posting
Please help me in this..
Regards,
KiranHi Kiran,
You are trying to load a request into the cube, but the aggregates are already rolled up with a request higher/newer than this request. To solve this I think that you need to deactivate the aggregates and afterwards reactivate and roll up new data.
Hope it helps.
BR
Stefan -
Image Loaded From Database not Visible in JLabel
import java.sql.*;
import javax.swing.*;
import java.awt.*;
public class consqlimage
public consqlimage()
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:dsn","sa","manshu");
Statement stat = con.createStatement();
ResultSet rs = stat.executeQuery("Select pic from t_image");
byte b[];
b = new byte[1000];
while(rs.next())
b= rs.getBytes("pic");
for(int a=0;a!=b.length;a++)
System.out.println(b[a]);
JFrame f = new JFrame();
ImageIcon i1 = new ImageIcon(b+"jpeg");
JLabel l1=new JLabel("january",i1,SwingConstants.LEFT);
f.getContentPane().add(l1);
f.getContentPane().setLayout(new FlowLayout(FlowLayout.LEFT));
f.setSize(500,500);
f.setVisible(true);
con.close();
catch(Exception e)
System.out.println(e);
public static void main(String args[])
new consqlimage();
}Any reason why you are adding the "jpeg" to the end of the byte array?
You should only have to pass the byte array to the ImageIcon constructor. -
DB Connect Load - "Unknow error while uploading data from the DB Table"
Hi Experts,
We have our BI7 system connected to Oracle DB based third party tool. The loads are performing quite well in DEV environment.
I would like to know, how we transport DB Connect datasources to Quality systems? Any different process to be followed for DB Connect datasources?
At present the connections between BI Quality and the third party quality systems are established. We transported the DataSource from BI DEV system to BI quality system, but on trigerring an infopackage we are not able to perform loads. It prompts - "Unknow error while uploading data from the DB Table".
Also on comparing the DataSources in DEV system and Quality system there are no fields in "Proposal" tab of datasource in Quality system. Also I cannot change or activate Datasource in Quality system as we dont have change access in quality.
Please advice.
Thanks,
AbhijitHi,
Sorry for bumping an old thread ....
Did this issue get ever get resolved?
I am facing the same one. The loads work successfully in Dev. The transport for DBConnect DS also moved in successfully.
One strange this is that DB User for dev did not automatically change to db user from quality when I transported the DBConnect datasource. DBCon DS still shows me the DB User from Dev in Quality system
I get "Unknown Error" whenever I trigger the data package.
Advait -
Error while connecting to the database from a JSP Page
Hi,
I am using a simple JSP page which is based on the sample JSP pages from OTN.
When I try to connect to my database using the following code:
InitialContext ic = new InitialContext();
OracleDataSource ds = (OracleDataSource)ic.lookup("jdbc/OTN9iDS");
m_connection = ds.getConnection();
I get the following error:
Naming exception Error while connecting to the database : javax.naming.NameNotFoundException: jdbc/OTN9iDS not found in JDBCTest-JDBCTestProject-webapp
Does anybody know wht this is happening?
Any help would be appreciated
FRankHi Frank,
Are you using standalone OC4J or 9iAS ? If you are using standalone OC4J then you need to add a proper data source entry in %OC4J_HOME%j2ee\home\config\data-sources.xml file.
If you are using 9iAS the you can log in to the Enterprise Manager console and add the data source entry by using wizard provided by 9iAS.
Ensure the case of the JNDI lookup string, since, it is case sensitive.
Hope this helps.
Abhijeet -
I have a .wft file and two databases: Deploy and Production.
If I save the .wft file to Production it works fine but if I save it to Deploy I get when Uploading from database:
1300: Could not load.
1114: Could not load from database.
1115: Could not load all definitions referenced by 'CON_MAIL' item type.
1115: Could not load contents of 'CON_MAIL' item type.
1101: Could not load item types from database. FILTER=CON_MAIL
210: Oracle Error: ORA-01403: no data found
. SQL text: SELECT protect_level, custom_level, name, display_name, description, type, subtype, format, text_default, to_char(number_default), to_char(date_default, 'YYYY/MM/DD HH24:MI:SS') FROM wf_item_attributes_vl WHERE item_type = :type ORDER BY sequence
It did not create in deploy the row in the table wf_item_attributes and I think this is not a NLS_LANG problem because the same file worked in Production DB (they have the same environement).
Any solution? I could create process in Deploy until one month ago.
Thanks in advance JRJosé,
Por tu nombre asumo que hablas español por lo que te escribo en ese idioma.
En nuestro caso, como el mensaje de error indicaba que el siguiente query generaba problemas, lo analizamos
SELECT protect_level, custom_level, name, display_name, description,
type, subtype, format, text_default, to_char(number_default),
to_char(date_default, 'YYYY/MM/DD HH24:MI:SS')
FROM wf_item_attributes_vl
WHERE item_type = :type
ORDER BY sequence
Encontramos que la vista wf_item_attributes_vl se basa en las tablas WF_ITEM_ATTRIBUTES y WF_ITEM_ATTRIBUTES_TL
El problema se generaba porque en la tabla WF_ITEM_ATTRIBUTES había un registro que no tenía su correspondiente en la tabla WF_ITEM_ATTRIBUTES_TL (considerar que la vista wf_item_attributes_vl filtra los datos de acuerdo al lenguaje de la sesión, usando userenv('LANG') )
Creando el registro faltante en la tabla WF_ITEM_ATTRIBUTES_TL, los datos del atributo aparecieron en la vista wf_item_attributes_vl, y el problema desapareció.
En nuestro caso el verdadero problema se originó por haber manipulado los datos de definición de atributos directamente desde las tablas y no a través de WF Builder
Saludos
SV -
ERR "Could not load "image-loading" from icon theme"
Just finished installing OpenBox on a virtualbox
But cannot get nitrogen to set background.
while running nitrogen from command line
[utkarsh@myhost ~] $ nitrogen
ERR: Could not load "image-loading" from icon theme, this indicates a problem with your Gtk/Gtkmm installI too had to the same problem. Couldn't find why we get that error. But could set the wallpaper using the command line.
-
Error while updating data from DataStore object
Hi,
Currently we are upgrading BW3.5 to BI7.0 for technical only,
we found and errors during process chain run in further processing step. This step is basically a delta loading from DSO to Cube.
The error message are:
Error while updating data from DataStore object 0GLS_INV
Message no. RSMPC146
Job terminated in source system --> Request set to red
Message no. RSM078
That's all no further errors message can be explained clearly here from system.
I have applied SAP note 1152453 and reactivate the datasource, infosource, and data target.
Still no help here!?
Please advise if you encountered these errors before.
Thanks in advance.
Regards,
David
Edited by: David Tai Wai Tan on Oct 31, 2008 2:46 PM
Edited by: David Tai Wai Tan on Oct 31, 2008 2:50 PM
Edited by: David Tai Wai Tan on Oct 31, 2008 2:52 PMHi Vijay,
I got this error:
Runtime Errors MESSAGE_TYPE_X
Date and Time 04.11.2008 11:43:08
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Short text of error message:
No start information on process LOADING
Long text of error message:
Diagnosis
For process LOADING, variant ZPAK_0SKIJ58741F4ASCSIYNV1PI9U, the
end should be logged for instance REQU_D4FIDCEKO82JUCJ8RWK6HZ9KX
under the log ID D4FIDCBHXPLZMP5T71JZQVUWX. However, no start has
been logged for this process.
System Response
No log has been written. The process (and consequently the chain)
has been terminated.
Procedure
If possible, restart the process.
Procedure for System Administration
Technical information about the message:
Message class....... "RSPC"
Number.............. 004
Variable 1.......... "D4FIDCBHXPLZMP5T71JZQVUWX"
Variable 2.......... "LOADING"
Variable 3.......... "ZPAK_0SKIJ58741F4ASCSIYNV1PI9U"
Variable 4.......... "REQU_D4FIDCEKO82JUCJ8RWK6HZ9KX"
Any idea? -
Error while inserting xml into database
Hi,
I'm trying to use the sample application available on OTN site i.e. Simple Bulk Loader Sample Application which inserts a xml more than 4k in xmltype.
But I am getting this error while using it from JDeveloper
Here is the error :
XMLLoader: Uploaded File write to clob c:\temp\sampleXMLFiles\PPF.XML
XMLLoader: Uploaded File after setc:\temp\sampleXMLFiles\PPF.XML
java.sql.SQLException: ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00229: input source is empty
Error at line 0
ORA-06512: at "SYS.XMLTYPE", line 0
ORA-06512: at line 1
void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int)DBError.java:134
void oracle.jdbc.ttc7.TTIoer.processError()
Process exited with exit code 0.
Any ideas !!!
Thanks
-RajeevHi,
Thanks for the reply.
Actually it all started with this error while runnning the code in Jdeveloper
SimpleBulkLoader.doBulkLoad- The system cannot find the path specified. IO:FileNotFound Exception
Then while debugging I thought its giving error because of writer.close( ); in one of the writeToClob API in BaseApplication.java. So I commented it and then started getting this error which I originally posted
java.sql.SQLException: ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00229: input source is empty
Error at line 0
ORA-06512: at "SYS.XMLTYPE", line 0
ORA-06512: at line 1
But now after I uncommented writer.close() and debugged the application again in JDeveloper, I see it reads the xml and keeps it in buffer properly but in the end it throws SQLException "No more data to read from socket" and in turn throws "The system cannot find the path specified. IO:FileNotFound Exception"
I have no idea what's going on ??
Thanks
-Rajeev -
"Error retrieving xml file from database"
Hello All,
I have installed and configured planning with Shared services. While I try to create an instance in Configuration Utility by entering the Instance Name, Host Name, Port (8300) and Click "Next", I get this error -
*"System failure:Error retrieving xml file from database".*
My RDBMS is - SQL Server 2005
OS - Windows 2003 Server
I am unable to work on planning for few months due to this error.. I would sincerely appreciate if someone can provide me a solution for this..
Thanks much,
Varma.Hi,
Ive seen this before.
If this is a new environment could you create a blank database and configure it as your System database? Then try again and you should be fine.
I think you may have some invalid entries in your sys database.
Seb
www.taysols.com.au -
Error While sending infopackages from OLTP to BI/urgent
Hi BW friends
im workin on production support and im new to it.while
running infopackage X ,it is throwing a error
error:While sending infopackages from OLTP to BI/urgent
In status tab it shows traingular yellow colour
and diagnosis says that No idocs could be sent to bi using rfc.
so if u know please reply me
Thank you
Amarnath kwhile loading data into the target we got this message and the solution is do manual update for that.
-
Error while creating subsite from site template
Hi,
I am getting below error while creating subsite from existing site template .
Sachin BhosaleThere must be a duplicate Email field created in any list/library. The cause can be identified by renaming the site template to sitename.cab > extact the cab file > open the manifest file search for email and see where it is associated. Refer
to the following blog post for more information
http://sharepointserved.blogspot.com/2012/11/a-duplicate-name-was-found.html
http://sharepoint.stackexchange.com/questions/11944/error-when-creating-a-site-from-custom-template-a-duplicate-field-name-name
Cheers,
Maybe you are looking for
-
BLANKET RELEASE가 INPROCESS 상태에서 더 이상 진행되지 않을 경우 해결 방법
제품: MFG_PO 작성날짜 : 2006-05-11 BLANKET RELEASE가 INPROCESS 상태에서 더 이상 진행되지 않을 경우 해결법 ====================================================================== PURPOSE 승인을 위해 Blanket Release가 submit 되었으나,어떤 이유로 인해 'INPROCESS' 상태로 되는 경우가 있다. 'INPROCESS' 상태가 된
-
Server 2012 can't install 14 updates... Since January!!!
I did a fresh install of Windows Server 2012 on a Intel 64 bit computer... a real one, not virtual. I've done a reinstall from formatted disk three times so far. In January I posted a message where I couldn't install two updates. Now the number h
-
How to Create a Table Component Dynamically based on the Need
Hello all, I have a problem i need to create dynamically tables based on the no of records in the database. How can i create the table object using java code. Please help.
-
hi I configure IMG settings under OPK1 for porcess order..I check "imediately proposal" for quantity/service..But when I use COR6N to confirm process order, the duration field is not proposed...Where should I configure in IMG? btw,is there any T
-
Errors in Kernel logs on my RV120W
Hello, after succesfully update to version 1.0.5.6, I have errors in my log. I made a factory reset after update and manualy set everything. I have cable internet connection, DHCP server in Cisco, use wifi and I have a few firewall and forwarding rul