Re: Storing/Retrieving ImageData in/from DB tables
Sai,
I prefer storing image in file (easier maintenance, copy, portability
etc.) on a file server, therefore i suggest the following example:
img_temp : imagedata = new();
img_path = '...';
img_temp.readfromfile(file=img_path);
<pic>.imagevalue = img_temp.clone(deep = true);
So you have to only store image path (file name) in SQL table column
(varchar type) and set img_path variable when you wish to display the
picture. I think this solution is quicker than retrieving SQL binary
data ( i guess you have common file server...)
Gabor
>
How can we store ImageData in a table and retrieve it back?
We have a requirement to store some pictures(from flat files) in a
SQL-Server table and load them
into the Window for display in Picture fields.
Sai,
have a look on Forte's Technote 7029. There you can find how to
Insert and Select Binary Data.
Hope this helps.
Christian Eberl
Von: SAMUDRALA Sai Prasad[SMTP:[email protected]]
Gesendet: Mittwoch, 30. Juli 1997 18:29
An: forte-maillist
Betreff: Storing/Retrieving ImageData in/from DB tables
How can we store ImageData in a table and retrieve it back?
We have a requirement to store some pictures(from flat files) in a
SQL-Server table and load them
into the Window for display in Picture fields.
We are using Forte 2.0.H.1 and SQL-Server 6.5 on Windows NT.
Any information, examples related to the above would be highly
appreciated.
Thanks,
Sai.
Similar Messages
-
Retrieving Multiple Values from a table
Dear Experts,
Can anyone let me know how to retrieve multiple rows from a table using Oracle BPEL Database Adapter and assign it to a output variable?
Regards,
Pradeep.If the input XML Record is as follows
Input xmlRecord:
<EmployeeCollection>
<Employee>
<id>10</id>
<lastName>Smith</lastName>
</Employee>
<Employee>
<id>20</id>
<lastName>Ram</lastName>
</Employee>
</EmployeeCollection>
I'm getting the following output when used with either queryByExample or normal SELECT option with a WHERE condition
<EmployeeCollection>
<Employee>
<id>10</id>
<lastName>Smith</lastName>
</Employee>
</EmployeeCollection>
Instead of all the records in the Employee table which meet the where condition?
I NEED OUTPUT AS FOLLOWS:
<EmployeeCollection>
<Employee>
<id>10</id>
<lastName>Smith</lastName>
</Employee>
<Employee>
<id>20</id>
<lastName>Ram</lastName>
</Employee>
</EmployeeCollection>
I'm using Transformation with for-each option
Can some one help it is very urgent.
Thanks & Regards,
Murali Vikrala -
How to retrieve 2 values from a table in a LOV
Hi
I'm pretty new to APEX. I try to retrieve two values from a table using a LOV. I have a table named DEBIT with then columns SITE, NAME and KEY
I want to display NAME to the user in a list. When the user select an item from the list, I want to retrieve the data of the SITE and KEY column of this item in order to launch an SQL command based on this two values.
How to retrieve thes two values whant the user chooses an item from the list ?
I apologize for my english, being french.
Regards.
ChristianChristian,
From what I understood about your requirement, you want a 'select list with submit' which displays "NAME" and based on the value selected, you want to get the corresponding values for "SITE" and "KEY" from the table.
<b>Step 1: Create a select list with submit, say P1_MYSELECT </b><br><br>
Use something like this in the dynamic list of values for the select list: <br>
SELECT NAME display_value, NAME return_value
FROM DEBIT<br><br>
<b>Step 2: Create a page process of type PL/SQL block. Also create 2 hidden items P1_KEY and P1_SITE. </b><br><br>
In the PL/sQL, write something like:
DECLARE
v_key DEBIT.KEY%TYPE;
v_site DEBIT.SITE%TYPE;
CURSOR v_cur_myvals IS
SELECT KEY, SITE
FROM DEBIT
WHERE NAME = :P1_MYSELECT;
BEGIN
OPEN v_cur_myvals;
LOOP
FETCH v_cur_myvals
INTO v_key,v_site;
EXIT WHEN v_cur_myvals%NOTFOUND;
:P1_KEY := v_key;
:P1_SITE := v_site;
END LOOP;
CLOSE v_cur_myvals;
END; <br><br>
Then you can use these values for whatever purpose you need to.
Hope this helps. -
How to retrieve the values from a table if they differ in Unit of Measure
How to retrieve the values from a table if they differ in Unit of Measure?
If no data is read
- Insure that you use internal code in SELECT statement, check via SE16 desactivating conversion exit on table T006A. ([ref|http://help.sap.com/saphelp_nw70/helpdata/en/2a/fa0122493111d182b70000e829fbfe/frameset.htm])
If no quanity in result internal table
- There is no adqntp field in the internal table, so no quantity is copied in itab ([ref|http://help.sap.com /abapdocu_70/en/ABAPINTO_CLAUSE.htm#&ABAP_ALTERNATIVE_1@1@]).
- - Remove the CORRESPONDING, so quantity will fill the first field adqntp1. ([ref|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm])
- - Then loop at the internal table and move the quantity when necessary to the 2 other fields.
* Fill the internal table
SELECT msehi adqntp
INTO TABLE internal table
FROM lipso2
WHERE vbeln = wrk_doc1
AND msehi IN ('KL','K15','MT').
* If required move the read quantity in the appropriate column.
LOOP AT internal_table ASSIGNING <fs>.
CASE <fs>-msehi.
WHEN 'K15'.
<fs>-adqnt2 = <fs>-adqnt1.
CLEAR <fs>-adqnt1.
WHEN 'MT'.
<fs>-adqnt3 = <fs>-adqnt1.
CLEAR <fs>-adqnt1.
ENDCASE.
ENDLOOP.
- You could also create another table with only fields msehi and adqntp and then collect ([ref|http://help.sap.com/abapdocu_70/en/ABAPCOLLECT.htm]) the data to another table.
Regards,
Raymond -
No data Exists error while retrieving the data from a table
Hi Everyone!
I am getting "No Data Exists" error while retrieving the data from a table....where i need to check...if possible please give me example link.....please help me regarding thisHi !
thanks for ur response...
I have written vo.executeQuery for the table...My page is running but i m not getting the data....I have to select two LOV's and when I click on Go button the data has to display in the table...After the selection of LOV's when I click on Go in the table "No data exists" message is appearing...the table has the data and the query is also executing...please give info where i did the mistake.... -
Retrieve short description from the table field
Hi all.
I got this system table called TBTCO. Inside the table, there is this field JOBCOUNT. How can i retrieve the short description from the table for this particular field? Any fm can be use?
thksHi
u can retrive the short text u want by writing simple query from the table DD03T:DD: Texts for fields (language dependent) there u can give table name fieldname and language then u can get the short text u want
plzz reward if i am usefull to u in any way..
for any further quiries u can contact me on [email protected] -
Stored pl/sql procedure retrieving similar records from different tables using
Hi all I'm trying to retrieve the employee num and employee name if they are both a driver and mechanic
I'm script my own procedure and it compiles with no issue but when i try to execute it. they will show me this error.
Error starting at line 29 in command:
EXECUTE VERIFY(1,'John Smith')
Error report:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "CARSON.VERIFY", line 8
ORA-06512: at line 1
01422. 00000 - "exact fetch returns more than requested number of rows"
*Cause: The number specified in exact fetch is less than the rows returned.
*Action: Rewrite the query or change number of rows requested
This is how my procedure look like:
CREATE OR REPLACE PROCEDURE VERIFY(
enum IN NUMBER,
ename IN VARCHAR) IS
empnum NUMBER;
empname VARCHAR(50);
Fail EXCEPTION;
BEGIN
select employee.e#, employee.name
into empnum, empname
from employee join driver
on driver.e# = employee.e#
join mechanic
on driver.e# = enum;
EXCEPTION
WHEN Fail THEN
dbms_output.put_line('OK');
END VERIFY;
and this is how i execute the procedure
EXECUTE VERIFY(1,'John Smith');
so may i know what have gone wrong? would be glad if someone is able to enlighten me.No need for a loop.
Just make sure that your query always returns at most one row. Adding a predicate like 'where rownum=1' is a way to achieve that:
select employee.e#
, employee.name
into empnum
, empname
from employee join driver on driver.e# = employee.e#
join mechanic on driver.e# = enum
where rownum = 1; -
Retrieving all FK from child table in a resultset
I have a parent and its child table.In child table there are many records containing the same PK of the parent as a foreign key(one to many relationship).Now how can I get all those values (in a resultset) of child table containing the same FK .The code i produced can fetch the first record of the same PK of the parent.But how can I get all with a single SQl statement and iterate through them as necessary.
String sql1="SELECT * FROM ChildTableName WHERE id= ' 100 ' ; //100 is the PK of Parent table // there are many records in Child Table having 100 as foreign key resultset = statement.executeQuery(sql1); resultset .next(); try{ System.out.println("Data> "+resultset.getString(1)); System.out.println("Data> "+resultset.getString(2)); System.out.println("Data> "+resultset.getString(3)); }catch(SQLException sqle){System.out.println("ERROR REFRESH : " + sqle); }{code} Edited by: Tanvir007 on Apr 17, 2008 4:35 AM Edited by: Tanvir007 on Apr 17, 2008 4:37 AM Edited by: Tanvir007 on Apr 17, 2008 4:40 AMduffymo wrote:
First of all,ARE U BLIND brother, didn't you see what I wrote-
String sql= "SELECT Flat_Rent.rent_id,Flat_Rent.flat_name FROM Month_Rent INNER JOIN Flat_Rent ON Month_Rent.rent_id = Flat_Rent.rent_id WHERE Flat_Rent.rent_id = '4-2008'" ;
Actually, I did see that. It makes me wonder why you were asking in the first place and what the problem is now.In the first place, I didnt use join,I did it later as u advised.But u asked me later about the join.Why?
>
People who have empty catch blocks are fools. If you don't want to be one, log or print the stack trace. It's good information to have, and it'll help you avoid problems in the future.People are fools for many reasons LIKE - even if I told u that I can retrieve record (but only the first record),there is no question of throwing an exception.And I DID fill catch block in the first place,look back.Later, it wasnt that much necessary bcos no exception throws at all.
However brother many thanks for an attempt to help me.I think I have solved the problem-
try{
String sql= "SELECT flat_name,flat_rent,elec_bill FROM Month_Rent INNER JOIN Flat_Rent ON Month_Rent.rent_id = Flat_Rent.rent_id WHERE Flat_Rent.rent_id = '4-2008'" ;
resultset = statement.executeQuery(sql);
resultset .next();
do
System.out.println("Flat Name>> " + resultset .getString(1));
System.out.println("Rent>> " + resultset .getString(2));
System.out.println("Elec Bill>> " + resultset .getString(3));
while(rs.next());
}catch(SQLException sqle){ sqle.printStackTrace(); }But the problem is, The fields in my DB are in this serial- rent_id,flat_name,flat_rent,elec_reading,elec_bill,total_rent,status
But as you can see from the code that I get the Flat name in 1,Rent in 2 and bill in 3 which should be 2,3,5 respectively.Can you tell me why it is so? -
How do I retrieve all data from a table and display it on a text area?
I want to retrieve all the data from one of my MS Access data table and display them all in a text area. how do i go among doing this?
In my car table i have the fields lined up like this..
license,color,doors and year_made
I have an Object class called CAR that will contain methods to set the data from these fields when it gets retrieved.
here's what i go so far.....
statement = getDBConnection().createStatement();
rs = statement.executeQuery("select * from car");
boolean moreRS = rs.next();
if(moreRS)
car.setLicense(rs.getLong(1));
car.setColor(rs.getString(2));
car.setDoors(rs.getString(3));
car.setYearMade(rs.getString(4));
//but this will only get me one car. How do I get more car data?
HELP!!Vector cars = new Vector();
while (rs.next()) {
String license = rs.getLong(1);
String color = rs.getLong(2);
String doors = rs.getLong(3);
String year = rs.getLong(4);
myTextArea.append(license+"\t"+color+"\t"+doors+"\t"+year+"\n");
Car car = new Car();
car.setLicense(license);
car.setColor(color);
car.setDoors(doors);
car.setYearMade(year);
cars.add(car);
}t=tab
n=newline
Vector: http://java.sun.com/j2se/1.4.1/docs/api/java/util/Vector.html -
Need to Retrieve Performance Details from System tables..
I want to retrieve the performance details (execution time , no of tables affected , no of rows selected) of a procedure that i execute, I tried searching the
System Tables and Monitor Views but i am not able to find out into which table all the performance data get stored for the procedure i execute.
Message was edited by: Tom FlanaganHi Vignesh ,
Primarily i would recommend you to go through this video
This is like a base for monitoring topics : Monitoring SAP HANA - Checklist | SAP HANA
Thanks,
Razal -
Need the logic to retrieve the data from the table
Hi ,
I have a table with the following data
ID Dept Sal
100 a 10
100 b 20
100 c 30
100 d 40
200 b 20
200 c 30
200 d 40
300 c 30
300 d 40
400 d 40
I want to retrieve the ID's from the above table based on the below logic..
a) If an ID is in Dept 'a' do not retrieve that ID.
b) If an ID does not exist in Dept 'a' then check if its in Dept 'B' and retrive only that row.
200 b 20
c) If an ID does not exist in Dept 'a' then check if its in Dept 'B' if not avaiable then
check for DEPT 'c' and 'd' and retrieve the Dept 'c' but Sal is calculated as sal of C*D
Result: 300 c 120 ( instead of 300 c 30 )
d) If an ID does not exist in Dept 'a' then check if its in Dept 'B' if not avaiable then
check for DEPT 'c' and 'd' , if not avaiable then and retrieve the Dept 'd'
Result: 400 d 40
Following should be the final result..
ID Dept Sal
200 b 20
300 c 30
300 d 120
400 d 40
I have around 25 million records in that table and the query should be included in the form of view or it shd be included in a view,so that it should not effect previous and present data.
Thanks in advance..
soumyh2. Homework Alert!
-
Retrieving duplicate values from a table
I have a table that has 80,000 rows. One column contains text identifiers as varchar2. There are almost all unique. A select count(distinct id) statement returns 79,980 rows. Is there a way to return only the remaining 20?
To know the unique values you can do this. but it would not return the rows, only the 20 or less duplicate values.
SELECT textColumn, count(*) as cnt_occurences
FROM yourTable
GROUP BY txtColumn
HAVING count(*) > 1; -
How to retrieve row data from a table
Hey,
Have a table with data and each row has one column which is a button. How do I retrieve the corresponding data of the row in which the button was clicked. Meaning what do I need to do differently in the table and what type of javascript on an onclick event etc would I need to get the data. If there is a better or simpler approach im open to any suggestions.
Thanks in advance for your assistance
e.g.
<table>
<tr>
<td>column1 data</td><td>column 2 data</td><<input type="button" value="select" onclick="?????"/>
</tr>
</table>In the onclick event submit the jsp with query string.
<onclick="process.do?rowId=<%=column1 data%>">
have column 1 data as a unique identifier. Using request.getParameter get the column1 data value and query the db again to fetch the whole row data. I guess, it will work. -
Storing (retrieving) data in (from) an XML file
Hi all,
I'm looking at storing some simple objects in XML files or a single XML file.
I was just wondering if J2ME CDC/Personal Profile has any packages that I should look into using. The idea is I'll have some (0..n) top level documents with 0..n name-value pair attributes and 0..n child documents.
I plan to use XML because of it's platform independance, and since the data I'm planning to store will not be overly complex or of large quantities I believe this to be a reasonable choice.
If anyone would like to suggest a different platform for data storage I'd be interested to hear your case.
So, does anyone have any idea on what packages I should be looking at or perhaps some examples?
Thanks in advance,
JoeAfter looking at both of them I think I'll go with nanoXML lite.. only because it seems simpler to use.
I'm having a problem when parsing my files using a FileReader though. It seems that there are some weird characters at the beginning of my files (These have been created in various methods.. from notepad and other text editors to Visual Basic). Any idea how I can remove these characters or where they have come from or why they are there?
Thanks in advance,
Joe -
Storing Data in Context from a table (multiple selection)
Hi,
I have created a node called cauverynode, which contains cauName and cauClient as its attribute. I have bound that node with the table. Now i have to store the selected clients into a context. How can i do that? Please help me out. i am unable to store the clients in a string context. Kindly solve it. Below is the code, which will store the selected item and put into a string variable.
public void supplyCauveryNode(IPrivateSampleComponent.ICauveryNodeNode node, IPrivateSampleComponent.IContextElement parentElement)
//@@begin supplyCauveryNode(IWDNode,IWDNodeElement)
IPublicSampleComponent.ICauveryNodeNode cauNode =
wdContext.nodeCauveryNode();
ArrayList selectedcauClients = new ArrayList(cauNode.size());
for (int i = 0, n = cauNode.size(); i < n; ++i) {
if (cauNode.isMultiSelected(i) || i == cauNode.getLeadSelection())
selectedcauClients.add(cauNode.getElementAt(i));
String strSelcaucli = null;
for (int i = 0, n = selectedcauClients.size(); i < n; i++) {
strSelcaucli = strSelcaucli + selectedcauClients.get(i);
wdContext.currentContextElement().setStrCauveryClient(strSelcaucli);
//@@end
Multiple selected data is been stored in this selectedcauClients arraylist, which is not working. Kindly help me out.
Thanks & Regards,
DhanaWhat is the following code supposed to do?
String strSelcaucli = null;
for (int ix = 0, n = selectedcauClients.size(); ix < n; ix++) {
strSelcaucli = strSelcaucli + selectedcauClients.get(ix);
wdContext.currentContextElement().setStrCauveryClient(strSelcaucli);
I guess you want to create a string containing the names(?) of all selected elements.
Then you should use something like
StringBuffer sb = new StringBuffer();
for (Iterator it = selectedcauClients.iterator(); it.hasNext(); )
ICauveryNodeElement e = (ICauveryNodeElement) it.next();
sb.append(e.getName());
if ( it.hasNext() ) sb.append(",");
String csv = sb.toString();
This gives you a comma-separated list of the names of the selected elements.
Armin
Maybe you are looking for
-
Bug with Show Whitespace and tab and space characters in SQL comments
If Preferences > Code Editor > Display > Show Whitespace Characters is checked, and I type the following in SQL Worksheet: --A[tab]B[space]C It renders with two spaces between B and C. The first one is a blank space without the light dot character us
-
Can I have my iTunes Library on two different computers? One pc and one mac
I have my iTunes library on my office pc. I just bought a MacBook Air and want to have my library on there as well. I have an iphone that I have synced to both, but it will only let me keep my songs on my work pc. Is there a way I can have it on both
-
OOPs Concept ! - Why Static Methods can't be redefined in its subclass ?
Dear Experts , I had searched the SDN , but unable to find out the satisfactorily answers .. Can anybody let me know the reason for the following Confusion in Oops Concept Question 1: As we know , We can Inherit the Static Methods in the Sub Class ,
-
Mine is an old IPod, 30 GB, Mod: A1136. I can´t find reference on the IPod page to download its manual or do an update on it. Can anyone please help?
-
Hi, Our Scenario: We are using portal with CUA userbase. But, now we want to use the portal for a Non-CUA system users ( this system is not part of CUA) How can I set up the portal authentication ? Can I setup two user bases ? Please advice