Storing value in a grid before storing to a database
Apex 4
Oracle 10g EE
Good Day I have this problem that states that when a user click the add button the value in the textfield will be stored in a grid, when he enter another value and click the ADD button it will store again in the next line of the grid so you have already two values in the grid. When the user press the SAVE button all values in the grid must be stored in my database two rows in the grid means two rows also on my database. How will I do that in apex? Any examples out their that will guide me? I really need your help. thanks a lot.
thanks for the reply, I've been searching for collection but I can't really understand what will be the process for it. Do you have any examples related to this problem? I guess no one can make this, Ive been browsing for whole day and no one clears my mind on how to deal with this problem. Im not good in jquery either im just a VB lover but apex seems to hit my nerves. dude. Any one out here who is will to give examples bout this problem? thanks so much..
Similar Messages
-
How to get values/data stored in the database into a list-item.
how to get values/data stored in the database into a list-item.
i tried to make a list item without any values assigned to it...but i got the below error.
FRM-30191: No list items defined for required poplist.
or
FRM-32082: Invalid value for given item type.
List EMPNO
Item: EMPNO
Block: EMP
Form: MODULE5
FRM-30085: Unable to adjust form for output.
then according to some docs, i tried the the following for the trigger
when-new-form-instance
declare
rg_name varchar2(40) := 'emp_rec';
status number;
groupid recordgroup;
it_id item;
begin
it_id := Find_Item('empno');
groupid := create_group_from_query(rg_name, 'select empno from emp');
status := populate_group(groupid);
populate_list(it_id, groupid);
end;
but yet didnt work... :(
so how the heck do i get values fetched from the database table into the list item?for list items you need to values in the record group, one is the shown value and one is the returned value.
Check out the online help for the populate_list built-in.
You'll need something like select ename,ename from emp as the record group query. -
Where is the value of report repository stored in the database?
Hi all,
One of our developers is trying to write a code that would send the output report (pdf)of a process through mail, typical work flow stuff.But the problem is that we are not supposed to hard code the value of report repositiry from where the report has to be picked.can anybody suggest a table in the database from where the value of report repository can be queried.
we tried using
select reportrepositorypt from pswebprofile.
but this doesnt return the correct path. we went to PIA->peopletools->webprofile ->webprofie configuration
here we updated the value in report repository field and saved it and queried again.
But this didnt solve our problem.
Its showing the previous value which is different from the actual report repository path.
all the servers are in solaris box.
please suggets.
Thanks!Right now, I am trying to send a PDF (XML Publisher report) as an email to our vendors (it is their ACH Advice).
What I have done so far is: Created an App Engine, one step to populate a state record with run control information and the second step that runs XML Publisher and creates PDF report(s) which are published to the Report Repository and saved to a file on our network. Now I think I just need to create a third step to recall the PDF(s) and send the PDF(s) out as emails to our vendors.
I have found that the PDF information from Report Repository is stored in the Database in the CDM_LIST_VW record (this is a view and the main underlying table is CDM_LIST, but this contains what I need for now, so I'm going to try using it first). The Report ID is stored in the CONTENTID field and the Report Description (description shown on the Report Repository -- which in our case contains the email address) is stored in the CONTENT_DESCR field. So I am going to try over the next week to write the logic to query the CDM_LIST_VW for the data needed for the email address and the ReportID to go and grab the file....The hardest part is finding the actual file but I am hoping that I can also find a URL on that table. I'd pull the file from the network, but XML Publisher writes them out into numbered folders where all the PDFs are named the XML Report Defn - thus same name). I have not tried any of this yet, but am hoping I'm on the right path.
I hope this helped answer your question.
Good Luck!
Jennifer -
Image not storing in SQLite Database
Hi All
I am creation an application in WPF C# in which i have created an Ink Canavs
now i want to insert the InkCanvas Data or stockes in SQLite Database for that i hv created an folder in my application
and on"btnSaveCanvasImg" button Clicked i am saving the image of InkCanvas in a folder and on "btnSaveImgInDatabase" button clicked The saved image stored in the database
But when i clicked on"btnSaveCanvasImg" button image saved in folder , but when clicked on "btnSaveImgInDatabase" button the image doesn't store in the database.
following is my code
XML:-
<Window x:Class="InkCanvasInDatabase.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="800" Width="600">
<Grid>
<InkCanvas Name="MainInkCanvas" HorizontalAlignment="Left" Height="500" VerticalAlignment="Top" Width="595">
<InkCanvas.Background>
<ImageBrush ImageSource="C:\Testimonial_Project\Assets\Images\notePaper.png"/>
</InkCanvas.Background>
</InkCanvas>
<Button x:Name="btnSaveCanvasImg" Content="Save Canvas Image" HorizontalAlignment="Left" Margin="33,599,0,0" VerticalAlignment="Top" Width="200" Height="51"
FontSize="20" Click="btnSaveCanvasImg_Click"/>
<Button x:Name="btnSaveImgInDatabase" Content="Save Image In Database" HorizontalAlignment="Left" Margin="281,599,0,0" VerticalAlignment="Top" Width="238" Height="51"
FontSize="20" Click="btnSaveImgInDatabase_Click"/>
</Grid>
</Window>
C# Code:-
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Ink;
using System.Windows.Ink.AnalysisCore;
using Microsoft.Win32;
using System.IO;
using System.Data.SQLite;
namespace InkCanvasInDatabase
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
string imagename;
public MainWindow()
InitializeComponent();
public void loadInkAnalyzer()
InkAnalyzer theInkAnalyzer = new InkAnalyzer();
theInkAnalyzer.AddStrokes(MainInkCanvas.Strokes);
AnalysisStatus status = theInkAnalyzer.Analyze();
if (status.Successful)
saveInkCanvasBitmap();
else
MessageBox.Show("Recognition Failed");
public void saveInkCanvasBitmap()
RenderTargetBitmap rtb = new RenderTargetBitmap((int)MainInkCanvas.Width, (int)MainInkCanvas.Height, 0,0, PixelFormats.Default);
rtb.Render(MainInkCanvas);
BmpBitmapEncoder encoder = new BmpBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create(rtb));
// FileStream fs = File.Open(@"C:\inkCanvas_Images\test.jpg", FileMode.Create);
FileStream fs = File.Open(@"C:\Users\xeniun1\Desktop\24.02.2015 Xenium_Project\23.02.2015 InkCanvas\InkCanvasInDatabase\InkCanvasInDatabase\InkCanvas_Images\.jpg", FileMode.Create);
encoder.Save(fs);
fs.Close();
public void insertImgInDatabase()
byte[] signature;
using (MemoryStream ms = new MemoryStream())
MainInkCanvas.Strokes.Save(ms);
signature = ms.ToArray();
string stConn = @"Data Source=inkCanvas_DB.db;Version=3";
SQLiteConnection sqliteConn = new SQLiteConnection(stConn);
sqliteConn.Open();
string sql = "INSERT INTO User_Details (User_Text) VALUES (@Sig)";
SQLiteCommand comm = new SQLiteCommand(sql, sqliteConn);
comm.Parameters.AddWithValue("@Sig", signature);
comm.ExecuteNonQuery();
private void btnSaveCanvasImg_Click(object sender, RoutedEventArgs e)
loadInkAnalyzer();
//MainInkCanvas.Strokes.Clear();
MessageBox.Show("Ink Canvas Save as Image");
private void btnSaveImgInDatabase_Click(object sender, RoutedEventArgs e)
insertImgInDatabase();
MainInkCanvas.Strokes.Clear();
MessageBox.Show("Ink Canvas Image saved in Database");
Plz provide solution for this
RegardsPlease close your previous threads by marking helpful posts as answer before you start a new one.
The type of the image columns should be BLOB. And make sure that you are looking at the inkCanvas_DB.db in the output folder of your .exe ([your_project_foder]/bin/Debug or [your_project_foder]/bin/Debug) because it is this database that the data gets written
to unless you specify an absolute path in the connection string:
string stConn = @"Data Source=C:\Your_Project_Folder\inkCanvas_DB.db;Version=3";
Please upload a reproducable sample of your issue to OneDrive and post the link to it here for further help.
And please remember to close your threads by marking helpful posts as answer. -
Display listbox key value in ALV GRID method
Hi All,
I have a program in which columns are generted dynamically based on number of fields. The column name is dynamic as it depends on its text while The value in Column's can be 1, 2, 3, 4, 5.
I am trying to display this in a list box along with the text which are maintained as fixed values at domain level.
space Walking
1 Archery
2 Boxing
3 Cycling
4 Rowing
Also I am displaying by using 'DD_DOMVALUEs_GET, looping through all the fixed values and concatenate
domvalue_l ddtext separated by cl_abap_char_utilities=>horizontal_tab. No tab space is coming between key and value.
Also for the 1st value which is space it is not coming properly as space is condensed.
The point is that after I am putting values in the grid. The system event data changed is called where the value selected is 1 Archery and it is going to bad cells, error protocol display . I want only the 1st character. How to modify the content in the grid before the system event gets called.
Regards,
DPMHi,
try follow code to setup fieldcat of that DROP DOWN field.
FCAT-DOMNAME = ' '.
FCAT-CHECKTABLE= '!'. -
When I select from the LOV, it is not storing in the database
Have a field (Manager) where the user selects their manager from the select list(generated from the query below)
select FIRST_NAME || LAST_NAME d, MANAGER_ID r
from PERSONNEL
where TITLE = 'MGR'
order by 1
After the manager is selected and Apply changes is clicked, nothing is stored to the database.
Have the Manager field specifications set as:
Source Used: Only when current value is session state is null
Source Type: Database column
Maintain Session State: Per Session
Source Value or Expression: MANAGER_IDWell, how have you created this form... manually or using wizard. If you have used wizard, then it would have asked you to select the table and it would have created process to update the same.
If you have created this form manually then you need to add a processs to update this to database...
Regards,
Shijesh -
Can Discoverer have link to display documents stored outside the database?
I posted a message some time ago called "Possible for Discoverer to display BLOB type documents stored in database?" and got great answer.
Now our customers are asking if it is possible, from Discoverer, to link somehow to a file stored outside the database on the Unix file system and get their computer to display it? Can anyone tell me if this is possible please?
The only thing I've seen in the documentation that may be related is in Oracle Business Intelligence Discoverer Configuration Guide, section 10.6 List of Discoverer user preferences. It says there that Discoverer preference ProtocolList can be set so that Discoverer hyperlinks can be set to use protocols such as telnet, but the default is HTTP, HTTPS, and FTP.
THank you in advance if you can help.
Regards,
Julie.Hi Rod,
I have tried the second method: "create a Oracle directory pointing to the Unix directory containing the files". I have had success with it, but I'd be grateful if you could advise me if you would have done this the same way as described below:
I put two Word docs and two text docs called clob_test1.txt, clob_test2.txt, blob_test1.doc, blob_test2 in the Unix directory corresponding to an Oracle directory called 'EIF'. I thought an extrenal table was needed so that Discoverer would have an object to write a queruy against. So I created a file called lob_test_data.txt with the following contents:
1,01-JAN-2006,text/plain,clob_test1.txt
2,02-JAN-2006,text/plain,clob_test2.txt
3,01-JAN-2006,application/msword,blob_test1.doc
4,02-JAN-2006,application/msword,blob_test2.
THen I created an external table using the following DDL:
CREATE TABLE jum_temp_lob_tab (
file_id NUMBER(10),
date_content DATE,
mime_type VARCHAR2(100),
blob_content BLOB
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY EIF
ACCESS PARAMETERS
RECORDS DELIMITED BY NEWLINE
BADFILE EIF:'lob_tab_%a_%p.bad'
LOGFILE EIF:'lob_tab_%a_%p.log'
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
file_id CHAR(10),
date_content CHAR(11) DATE_FORMAT DATE MASK "DD-MON-YYYY",
mime_type CHAR(100),
blob_filename CHAR(100)
COLUMN TRANSFORMS (blob_content FROM LOBFILE (blob_filename) FROM (EIF) BLOB)
LOCATION ('lob_test_data.txt')
PARALLEL 2
REJECT LIMIT UNLIMITED
then created a Discoverer End User Layer folder against this external table, and used exactly the same technique as we did for downloading the BLOB from the database table (creating a new folder item containing a URL calling a database procedure which calls the Oracle code to download the doc). THis worked, but sometimes my PC didn't seem to know that the Word docs were Word docs and it needed to launch Word. Other times it did manage to do this OK. It always displayed the two .txt files as HTML docs.
Just wondered if you'd be good enough to critique this approach.
THank you, Julie. -
Where is the enjoylogo.gif stored in the database
Can anyone tell me where these type of files are stored in the database? Are they in a table?
If you have 2 lists, List A contains custom names, List B has a lookup field that points to List A. I go into list B and select a client name ("Contoso"), enter some info, and save it. On the back end, the list item will contain a value of something like:
34#;Contoso
In this scenario the 34 is the SPListItem.ID value of that item in List A. They start at 1 in each list and increment by 1.
Also, running queries against the database directly is not supported and can take your database out of Microsoft's supportability.
Dimitri Ayrapetov (MCSE: SharePoint) -
Data encryption within Azure website storing in Azure database
I am wondering what the best way to encrypt/decrypt my documents (which will be stored within my database) while at rest. My web app will allow user to upload document and share them with other people so they can download them.
I want the encryption keys/intial vectors to be generated from code so there is no user input. Here is my current thought which is a hybrid of AES/RSA.
Create a new table called keys within my database which will look like the following...
ID | Key | Vector
then when a document is uploaded the Key/Vector is generated and used to encrypt the document and then the document is saved into the document table returning the document ID, which will be stored within the new table in the ID field along with the key and
vector.
Then i somehow need to protect the keys as anyone who grabs my database will have access to all the doucments still as the keys are there!
So i was thinking i would upload a private certificate into Azure storage and store the public certificate inside my web app so before the key/vector is saved my application will encrypt them with the public certificate.
Then when a user downloads a document, the app will connect to my Azure storage account and grab the private key, it will grab the row from key table associated with the document id they are trying to download and then it will use the private key to decrypt
the key/vector then it will use the key/vector to decrypt the document.
Does this seem the best way forward for how to do it, am i way off, or is there a security hole within this solution?All your keys are still the same so long as you use one cert to do the work. (and they're all still in one place). If the app downloads the private key, well - the app and anyone in the middle has the key to figure out the rest and decrypt all the
data. You'll struggle to make good security just by adding levels of effort or middle steps like that.
What you're doing is kind of like storing the key to your house in your car, and the car's key is in the car's door lock. You've just added a single step to get inside your home.
If I have your DB, I probably have your code, which means I know how to do the rest, and since everything is public, so is the resultant data.
What I'd do is have Azure Storage holding the encrypted data, and a key share table. Use the DB as an index if you feel you need, but it's cheaper to go with just storage.
Each app would create, have, and hold privately, an AES private key. The app would somehow initially upload the public key for the user to the key share table via your service.
When user A wanted to send to user B, they would get B's public key from the key share. The App would encrypt A's Document and only then send the encrypted data to B's 'mailbox'. Later, B would come along and see a file was waiting. They'd download
the encrypted data and then decrypt it with their private key which has never left their app/device/wherever.
Think about making every private key 'private' to the entity owning it. Don't ever store/share/transmit a private key where any public entity can get it. That's the only way it'll work.
To make things even harder, you can do things to the data before document encryption, (and after) but never mess with the one golden rule of AES:
Keep "private" private, private!
Darin R. -
Firing Stored Procedure Into Database At Runtime
HI All,
I need a help !. I have created a stored procedure that creates a dynamic SP at runtime depending upon certain values stored in my database. Now I want that as soon as the dynamic SP is written in a flat file on the database server it should be compiled into database.
What I am doing right now is :
step1: create a SP
step2: fetch values from database
step3: create a string from it which actually contains syntax for creating another SP
step4: open a new file "test.sql" on the database server
step5: write this string into "test.sql"
step6: close the file "test.sql"
step7: exit SP
This creates a file named "test.sql" on oracle database server.
Now my requirement is to include another step after step6 say
step6.1: compile "test.sql" into the database.
Does any one have idea how to achieve this using SP.
Thanks & regards
Vivek VermaI don't know which solution you're attempting, but here goes.
You cannot build a procedure using objects (e.g. tables, views) etc when you have been granted rights to them via role. Similarly you cannot use execute immediate to use a system privilege (e.g. CREATE PROCEDURE) if you have been granted it through a role (e.g. CONNECT).
In both cases the relevant solution is to get the grantor (table owner, dba user) to grant the privilege to your account by name.
Cheers, APC -
Run a plsql script that is stored in a database in forms
Hi there is it possible to run a plsql script that is stored in a database as a CLOB with parameter placeholders that will be replaced with the contents that will be inserted in a form? If it's possible how do I do this?
RegardsI don't think you can pass a parameter in Francois' example. You probably need a wrapper procedure as explaind by W1zard. So, the question pops up: why can't you create a stored procedure instead of an anonymous block in a clob column? If you do need it, it could look something like:
Code in the table:
begin
insert into emp(empno,ename)
values (:1, :2);
end;
{code}Wrapper procedure:
{code:java}
create or replace procedure call_script(i_empno in number, i_ename in varchar2) as
v_stmt varchar2(32000); -- CLOB is not possible, because execute immediate cannot use it.
begin
select replace(script_code,chr(13),chr(10))
into v_stmt
from script_table
where script_id = 1;
execute immediate v_stmt using i_empno, i_ename
end;
{code}
Edited by: Ino Laurensse on Jan 22, 2009 10:52 AM
Edited by: Ino Laurensse on Jan 22, 2009 10:58 AM
(forum had some problems. Old code was posted first) -
Value from data grid not showing in workspace
Hi everyone.
I've entered value in data grid that i maid in Planning for one member. It looks like there is no velue for that member. What needs to be done to recognize new source?
Member is set on Store and is used in some formulas in Dynamic Calc members.
Thx.Maybe it is an implied share, is it is an only child, set the member to "never share", refresh and try again.
Cheers
John
http://john-goodwin.blogspot.com/ -
Download of files stored in the database
I am using FireFox and my users IE. Download of files stored in the database worked for me but not for my users. I recieve a choice of downloading the file or opening it with a full file name and file type. IE users have some strange behaviour - no name of the file and they can only save it to their local drive - some kind of weird microsoft security option. I was searching for it but couldn't find. Anyone here who would know where to search for it?
Denes KubicekHello Jens,
I am using the standard procedure from the manual:
CREATE OR REPLACE PROCEDURE download_my_file_pr (p_file IN NUMBER)
AS
v_mime VARCHAR2 (255);
v_length NUMBER;
v_file_name VARCHAR2 (2000);
lob_loc BLOB;
BEGIN
SELECT mime_type, blob_content, NAME, DBMS_LOB.getlength (blob_content)
INTO v_mime, lob_loc, v_file_name, v_length
FROM my_file_table
WHERE ID = p_file;
-- set up HTTP header
-- use an NVL around the mime type and
-- if it is a null set it to application/octect
-- application/octect may launch a download window from windows
OWA_UTIL.mime_header (NVL (v_mime, 'application/octet'), FALSE);
-- set the size so the browser knows how much to download
HTP.p ('Content-length: ' || v_length);
-- the filename will be used by the browser if the users does a save as
HTP.p ('Content-Disposition: attachment; filename="' || v_file_name || '"');
-- close the headers
OWA_UTIL.http_header_close;
-- download the BLOB
wpg_docload.download_file (lob_loc);
END download_my_file_pr;
Denes Kubicek -
What else are stored in the database buffer cache?
What else are stored in the database buffer cache except the data blocks read from datafiles?
That is a good idea.
SQL> desc v$BH;
Name Null? Type
FILE# NUMBER
BLOCK# NUMBER
CLASS# NUMBER
STATUS VARCHAR2(10)
XNC NUMBER
FORCED_READS NUMBER
FORCED_WRITES NUMBER
LOCK_ELEMENT_ADDR RAW(4)
LOCK_ELEMENT_NAME NUMBER
LOCK_ELEMENT_CLASS NUMBER
DIRTY VARCHAR2(1)
TEMP VARCHAR2(1)
PING VARCHAR2(1)
STALE VARCHAR2(1)
DIRECT VARCHAR2(1)
NEW CHAR(1)
OBJD NUMBER
TS# NUMBERTEMP VARCHAR2(1) Y - temporary block
PING VARCHAR2(1) Y - block pinged
STALE VARCHAR2(1) Y - block is stale
DIRECT VARCHAR2(1) Y - direct block
My question is what are temporary block and direct block?
Is it true that some blocks in temp tablespace are stored in the data buffer? -
Image compressed and stored in the database.
Hi,
We have a tiff file stored in the database and then compressed using the following Intermedia Oracle method.
process ('compressionFormat=FAX4,maxScale=1696 2200'); and save it back in the database.
This oracle database is 8.1.7.4. The tiff file gets processed when we use TIFF file generated by old scanner but errors out with the TIFF file generated by latest scanners.
The error I get is ORA 29400 , IMG-00704.
There is a difference in TIFF version in the outputs generated by two scanners,
The compression option : TIFF modified G3 in the old one
while the new one has Lempel-Ziv
Also, the tiff is loaded and saved fine but the image gets corrupted after the intermedia process method is run.Thank you for your reply. I am glad to find that I did not miss an option. I was aware that I could move my pictures into some other folder, but you have forgotten the solution that I chose. That was to go back and use ZoomBrowser, which works to access photos in any folder I choose. In addition it loads promptly. I have only spent a brief time using the ImageBrowser but don't recall seeing any enhancements that over ZoomBrwoser. Perhaps if I was attempting to interface with other software but as a stand-alone product, well perhaps you could enlighten me as to what makes ImageBrowser EX a better product.. Regarding the Accept as Solution: are you implying that Canon restricts their search function to only those responses that the OP marks as accepted?
Maybe you are looking for
-
Does my T61 6457-Z4U have digital video out capability​?
The video out connector is the standard DB-15 (three row) female connector type. The Display control panel properties and the XP System Information utility shows "Name: NVIDIA Quadro NVS 140M". My external monitor (Samsung Syncmaster 940BF) can accep
-
Smart collection drop down does not include keywords
I must have gotten this right once, because I have a smart collection whose only condition is a keyword, which is at the top of the drop down for that collection. Likewise there is a default smart collection that LR must have created, which is calle
-
I can't log onto my macbook air as the caps lock seems to be stuck (even tho its not). Using brand new Macbook Air OS Lion, not technical so need step by step instructions pls
-
how to get the pc to boot from dvd drive
-
I'm having some issues converting video using VLC. I'm tring to converting some files as .wmv, .avi and mp4 to mpg but some files work well and some of then doesn't work in DMP 4400. Please what software can you recommend to me and a good parameters