Store the values in database
can anyone let me know how to store the values when enter the button in mysql database by using java flex
<?xml version="1.0" encoding="utf-8"?><mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
import mx.managers.PopUpManager;
import mx.collections.ArrayCollection;
private function empLogin():void {lm.Login(txt_empid.text, txt_empname.text, txt_empadd.text);
private function resLogin(event:ResultEvent):void {
var res:String = event.result as String;Alert.show(res);
]]>
</mx:Script>
<mx:RemoteObject id="lm" destination="logMod">
<mx:method name="Login" result="resLogin(event)" />
</mx:RemoteObject>
<mx:Panel x="46" y="44" width="358" height="271" layout="absolute">
<mx:title><![CDATA[ EMPLOYEE DETAILS]]></mx:title>
<mx:Label x="10" y="25" text="Emp_Id" width="84" id="lbl_empid" enabled="true"/>
<mx:TextInput x="151" y="23" id="txt_empid" displayAsPassword="false" editable="true" enabled="true"/>
<mx:Label x="10" y="78" text="Emp_Name" width="98" id="lbl_empname" enabled="true"/>
<mx:TextInput x="151" y="76" id="txt_empname" displayAsPassword="false" editable="true" enabled="true"/>
<mx:Label x="10" y="134" text="Emp_Address" width="84" id="lbl_empadd" enabled="true"/>
<mx:TextInput x="151" y="132" id="txt_empadd" displayAsPassword="false" editable="true" enabled="true"/>
<mx:Button x="136" y="182" label="Submit" id="but_sub" enabled="true" click="empLogin()"/>
</mx:Panel>
</mx:Application>
thanks®ards
sonu
referr:
http://www.adobe.com/devnet/flex/articles/flex_and_java.html
http://www.adobe.com/devnet/livecycle/articles/blazeds_testdrive.html
Similar Messages
-
How to store the value in table
Hi All,
I ve a requirement where im adding a check box on a seeded supplier_create page via personalization. The seeded page contains only a root AM and a root controller.The table which stores the supplier details does not have a dff.so i have to store a yes or no value and a foreign key ref into a custom table to map both the tables. the rootAM is actually calling the underlying seededVO to create a row in the database.Now how can I insert the yes/no and the foreign key values into my custom table??
Thanks.Isn't there any other column in the table which you can use?
Anyway you can call a PLSQL API (to create a row in the Custom Table and store the value and also to make a foreign key join therein). This PLSQL can be called from the Controller (extend the standard Controller).
Now when you come to the Page, either you substitute the standard VO, or easier still (since I assume checkbox is on the Page and not in the table), you can call a PLSQL function and get the value of the checkbox. May be you can also create a dymanic VO and get the value from the Custom table for the current standard table row.
Please do a compete thinking on the idea above and do let me know where you forsee issues. The above solution focusses more on PLSQL API invocations and thus decreases the need for Substitutions.
Thanks
Sumit -
Where to store the values for the purpose of logging
For the purpose of logging, i would like to store few values like strings, some objects, some exceptions[ after few transactions from the end user ] in the SP server.
which is the best approach for storing these?
if i use splist, the items will reach 5000 within a week as far as my appl's usage is concerned , hence it will cause a performance issue in future.
so how can i store the values in the splist?
should i use a separate custom sql db and use ado.net to store the values when enduser peforms the tasks?
help is appreciatedHi SaMolPP,
You should try to use the existing ULS logging, following article is for 2010 but should also work in 2013 :
http://geekswithblogs.net/venkatx5/archive/2010/12/09/how-to-use-uls-in-sharepoint-2010-for-custom-code.aspx
No additional lists or databases needed.
Hope this helps -
IN which table stores the Value of sales orders Net Value
IN which table stores the Value of sales orders Net Value
Hi Lakshmi,
Check Following Tables:
CRMD_PRICING_I
CRMM_PR_SALESA
CNCCRMPRSAP00090
Reward Points if Helpful.
Srini. -
How to store the value to variable?
hi
plz c the below code...
my prblm is i want to store the value of wa_final-preis into new_xeipa-preis if there is only one ebeln...
if there are more procss orders then i want to save the first value to new_xeipa-preis wn second record comes then new_xeipa-preis should be replaced by new value and old_xeipa-preis replaced by old value....
how to do this?
LOOP AT xeipa INTO wa_xeipa.
idx = sy-tabix.
CLEAR: wa_xeina.
READ TABLE xeina INTO wa_xeina WITH KEY infnr = wa_xeipa-infnr.
IF sy-subrc is INITIAL.
wa_final-infnr = wa_xeipa-infnr.
wa_final-ebeln = wa_xeipa-ebeln.
wa_final-bedat = wa_xeipa-bedat.
wa_final-matnr = wa_xeina-matnr.
wa_final-lifnr = wa_xeina-lifnr.
wa_final-peinh = wa_xeipa-peinh.
wa_final-preis = wa_xeipa-preis. "net price
wa_final-bprme = wa_xeipa-bprme.
wa_final-bwaer = wa_xeipa-bwaer.
IF ( wa_final-infnr is NOT INITIAL ) AND ( wa_final-ebeln is NOT INITIAL ) .
ABWEICHUNG = ( new_xeipa-preis / old_xeipa-preis ) * 100 .
ENDIF.
append wa_final to it_final.
ENDIF.Hi Smitha,
Check the below given code.
LOOP AT xeipa INTO wa_xeipa.
idx = sy-tabix.
CLEAR: wa_xeina.
READ TABLE xeina INTO wa_xeina WITH KEY infnr = wa_xeipa-infnr.
IF sy-subrc is INITIAL.
wa_final-infnr = wa_xeipa-infnr.
wa_final-ebeln = wa_xeipa-ebeln.
wa_final-bedat = wa_xeipa-bedat.
wa_final-matnr = wa_xeina-matnr.
wa_final-lifnr = wa_xeina-lifnr.
wa_final-peinh = wa_xeipa-peinh.
wa_final-preis = wa_xeipa-preis. "net price
wa_final-bprme = wa_xeipa-bprme.
wa_final-bwaer = wa_xeipa-bwaer.
" First time this value is not populated. When the second value comes in,
" New value gets populated in OLD variable and New value is replaced with the latest.
*IF idx NE 1.*
*old_xeipa-preis = new_xeipa-preis.*
*ENDIF.*
*new_xeipa-preis = wa_xeipa-preis.*
IF ( wa_final-infnr is NOT INITIAL ) AND ( wa_final-ebeln is NOT INITIAL ) .
ABWEICHUNG = ( new_xeipa-preis / old_xeipa-preis ) * 100 .
ENDIF.
append wa_final to it_final.
ENDIF.
ENDLOOP.
I hope this is what you were looking for.
Thanks & Regards,
Ram.
Edited by: ram Kumar on Jun 12, 2009 5:16 PM -
What is the datatype to store the value of variable of UTL_HTTP.resp
Hello,
I am using Oracle 11g R2 SOE.
I have table Called SMS consists of two columns (TEXT , RESPONSE) to store the value of variable of type UTL_HTTP.resp
the datatype of TEXT column is varchar2.
What should be the datatype of the column RESPONSE that is supposed to store the value of a variable of type UTL_HTTP.resp ????
Please see the following example if it was not clear;
Declare
l_url2 SMS.RESPONSE%TYPE;
l_http_request2 UTL_HTTP.req;
l_http_response2 UTL_HTTP.resp;
begin
l_http_request2 := UTL_HTTP.begin_request(l_url2);
l_http_response2 := UTL_HTTP.get_response(l_http_request2);
insert into SMS (text,response) values (l_url2,l_http_response2);
UTL_HTTP.end_response(l_http_response2);
end;Regards,
FatehFateh wrote:
Hello,
I am using Oracle 11g R2 SOE.
I have table Called SMS consists of two columns (TEXT , RESPONSE) to store the value of variable of type UTL_HTTP.resp
the datatype of TEXT column is varchar2.
What should be the datatype of the column RESPONSE that is supposed to store the value of a variable of type UTL_HTTP.resp ????
Please see the following example if it was not clear;
Declare
l_url2 SMS.RESPONSE%TYPE;
l_http_request2 UTL_HTTP.req;
l_http_response2 UTL_HTTP.resp;
begin
l_http_request2 := UTL_HTTP.begin_request(l_url2);
l_http_response2 := UTL_HTTP.get_response(l_http_request2);
insert into SMS (text,response) values (l_url2,l_http_response2);
UTL_HTTP.end_response(l_http_response2);
end;Regards,
Fatehutl_http.resp is a record type Its defined like this
TYPE resp IS RECORD (
status_code PLS_INTEGER,
reason_phrase VARCHAR2(256),
http_version VARCHAR2(64));http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/u_http.htm#i1012713
I would suggest in your table you split the RESPONSE column into 3 different column and store the fields STATUS_CODE, REASON_PHARSE and HTTP_VERSION accordingly. -
Which table stores the value of status column in leave request.
Which table stores the value of status column in leave request.If i give pernr ,absence type and date how would i get the status
Thanks
Bala DuvvuriHi,
PTREQ_ACTOR - Request Participant
PTREQ_ATTABSDATA - Request Data for Attendances/Absences
PTREQ_BATCH - Time Stamp for Run of Background Jobs
PTREQ_CKEY_MAPP - Cache Assignment Table
PTREQ_HEADER - Request Header
PTREQ_ITEM_TYPES - Request Item Types
PTREQ_ITEMS - Request Items
PTREQ_NOTICE - Note for Request
PTREQ_STATUS_CHK - Check Methods for Status Transitions
PTREQ_STATUS_TRA - Status Transfers
PTREQ_TYPE - Request Types
PTREQ_XFEREVENTS - Permitted Status Transitions
PTREQ_XFEREVNT_T - Texts for Status Transitions
Value of staus column you can check it PTREQ_STATUS_CHK -
Database connection problem when i try store the values in JTable
Hi Sir,
I have a database connection problem when i try to store the data's in a JTable.I think the problem is with in the database connection.I have used 3 vectors here.The database which i have used is
Access.Where the program is compiling well.But when i run it only the first column heading is printed and error message showing that
"Invalid Cursor State".I need to solve this problem.pls. do help me.
I will provide u with the code.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.*;
import java.sql.*;
public class DataBaseVector extends JPanel
//Container contentPane=getContentPane();
JScrollBar jsb = new JScrollBar(JScrollBar.HORIZONTAL);
JScrollBar jsb1 = new JScrollBar(JScrollBar.VERTICAL);
Image i1;
String url="jdbc:odbc:Ananth";
Vector col=new Vector();
Vector rows=new Vector();
Vector rdata=new Vector();
Connection conn;
public DataBaseVector()
//super("JTable With ScrollBars");
this.setLayout(new BorderLayout());
UIManager.put("ScrollBar.track",Color.red);
UIManager.put("ScrollBar.thumb",Color.blue);
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection(url); // Is there any problem here?
Statement st=conn.createStatement();
ResultSet rs=st.executeQuery("Select * from AccountMaster");
// rs is the result set obtained
ResultSetMetaData rsmd=rs.getMetaData();
int cols=rsmd.getColumnCount();
for(int i=1;i<=cols;i++)
col.addElement(rsmd.getColumnName(i));
rdata.addElement(rs.getString(i));
rows.addElement(rdata);
}catch(Exception e)
System.out.println("The Error Message was:"+e.getMessage());
JTable jt=new JTable(rows,col);
int v=ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
int h=ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
JScrollPane jsp=new JScrollPane(jt,v,h);
this.add(jsp,BorderLayout.CENTER);
this.add(jsb, BorderLayout.SOUTH);
this.add(jsb1, BorderLayout.EAST);
public static void main(String args[])
JFrame jf=new JFrame();
JPanel frame=new DataBaseVector();
jf.getContentPane().add(frame);
jf.setSize(800,600);
jf.setVisible(true);
Thanx,
m.ananthuThe problem is ResultSet.next() is not called.
Try this and modify the table creation as you need.
ResultSetMetaData rsmd=rs.getMetaData();
int cols=rsmd.getColumnCount();
while(rs.next()) {
for(int i=1;i<=cols;i++)
col.addElement(rsmd.getColumnName(i));
rdata.addElement(rs.getString(i));
rows.addElement(rdata);
Hope this helps -
How to store the value of request message and use it in Response mapping
Hi All,
We have an requirement where we need to store the data coming in Request Mapping and use the stored value in Response Mapping. Can anybody help us in how to proceed?
Thanks
SujataHi!
In Mapping you may use the RFC Lookup function to store values in database table during request mapping and to read values from database table during response mapping.
You can also use an ABAP or Java Mapping "in front of your" message mapping to store/read the values.
You can also use an Adapter Module (if applicable for the adapter type you use) and/or a UDF to store the data e.g. in Dynmaic Configuration Header of Request Message and to read these data from Dynamic Configuration Header of Response Message. But this works only for synchronous scenarios (and it means overhead in your message traffic).
Hope these thinkings help you o find the most suitable way for your concrete scenario!
Regards,
Volker
Note:
These techniques help you to avoid using BPM.
Edited by: Volker Kolberg on Aug 27, 2009 11:18 AM -
Commit not allowed in Trigger then how to store the values in table
Hi,
Database trigger not allowed to COMMIT in it (directly) or in procedure which is calling from the Trigger. it gives error.
so my question is:-
1)How Database internally store the INSERT AND UPDATE value in table which is written in procedure without COMMIT?
2) Is it necessary to write COMMIT in procedure using PRAGAMA AUTONOMOUS TRANSACTION to store inserted or updated value in table?
Thanks in advance.Hi,
A trigger is designed to be a part of a transaction, not it's end.
It is like following these steps (not really accurate, but should give an idea):
1. programA issues INSERT statement on tableA
2. 'control' goes over to the database
3. constraint checks happen
4. the associated triggers on tableA do their work (e.g. fetching a sequence value for a primary key)
5. 'control' goes back to programA
6. programA decides if a commit (no error occurred) or a rollback (error case) has to be issued.
Did this help? Probably not, I'm not happy with what I wrote, but anyway... :) -
Problem in saving the ½, ¼, ¾ values in database using xml
Hi
I am developing a java swing based application. In which I send data in xml format and save it on a online webstore through API calls.
When I send the data in following format 3½, 3¼, 3¾. It saves only 3 not the whole value means It is ignoring the values ½, ¼, ¾.
Here is my xml code which I am sending on network.
<?xml version="1.0" encoding="UTF-16" standalone="yes"?>
<product>
<product-type>Shirts</product-type>
<title>testStyle</title>
<variants type="array">
<variant>
<fullfilment-service>manual</fullfilment-service>
<inventory-management>shopify</inventory-management>
<inventory-policy>deny</inventory-policy>
<option1>Black</option1>
<option2>3¼</option2>
<option3 nil="true"></option3>
<price>40.0</price>
<requires-shipping>true</requires-shipping>
<sku>1307681713338</sku>
<taxable>true</taxable>
</variant>
<variant>
<fullfilment-service>manual</fullfilment-service>
<inventory-management>shopify</inventory-management>
<inventory-policy>deny</inventory-policy>
<option1>Black</option1>
<option2>3½</option2>
<option3 nil="true"></option3>
<price>40.0</price>
<requires-shipping>true</requires-shipping>
<sku>1307681714634</sku>
<taxable>true</taxable>
</variant>
</variants>
</product>In option2 tag I am passing ½, ¼, ¾.
Please give me some solutions .
Thanks
Edited by: Sonal on 28-Jun-2011 22:28hi
Thanks for your reply.
I am using JAXB Parser for parsing. Here is my code.
// Prepare for XML marshalling
JAXBContext jaxbContext = JAXBContext.newInstance(ProductVariant.class);
Marshaller marshaller = jaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
StringWriter stringWriter = new StringWriter();
// Marshall product variant to XML
marshaller.marshal(objProductVariant, stringWriter);
// Prepare request content
String entityString = stringWriter.toString();
StringEntity entity = new StringEntity(entityString);
entity.setContentType("application/xml");
httpPost.setEntity(entity);
// Execute API call
HttpResponse response = httpClient.execute(httpPost);ProductVariant is a class name and objProductVariant is a name of object.
When I check the entityString value, 3½ is present there but after saving it, when I check in database it store 3 only. -
Double click and get and store the value in variable.
Hi,
My intention is when i double click a particular record on a tabular, i want to capture or store the particular value of record into a variable and call that variable in print/preview button PLSQL code.
Below i show the screenshot which contain a tabular and print preview button. After populating the data. the user will double click on the agent code LC354 and click the print/preview button it should display report for only the
agent code of LC354(this is what i want). But normally when i click the print preview button it wil show the report of agent code of LC354 and LC325(this what i dont want).
http://imageshack.us/photo/my-images/811/printpb.png/
My problem is how to capture the value((*LC354*)) of particular record after double click the agent code(*LC354*)?
i tried to store agent code in variable AG_CNT in mouse double click trigger with following plsql code. but it dosent work.
declare
AG_CNT varchar2(10);
begin
*AG_CNT* :=GET_ITEM_PROPERTY('RFQ_AGENT_DETAILS.AGENT_CODE',CURRENT_RECORD);
end;after that pass that AG_CNT value in *:AG_CODE*. below code is in print/preview button.
cursor c1 is select nvl(count(ENQUIRY_NO),0) from scott.EXP_QUOTE_STATUS
where ltrim(rtrim(upper(job_status))) like 'APPROVED%' and ENQUIRY_NO = :REQ_FOR_QUOT.ENQUIRY_NO
AND AGENT_CODE=*:AG_CODE* ;how to do this?
skud.Hi skud
i juast want to store the agent code to variable.if i did get ur point...
Why don't u just use a simple assign statment for example...
DECLARE
V_VALUE NUMBER;
BEGIN
V_VALUE := LC354 ; -- IF it was a value as LC354 static i mean
-- or u could use any value
V_VALUE := :ur_form_item_name; --- if it was dynamic
END;That's it .
Hope this helps...
Regards,
Ammatu Allah. -
Have a error in getting the values from database randomly
Hi to all
I am new member to this community and new to java programming, i am the one of them who got benefited through this site , with that hope i am asking u to clear my doubt.
Actually i want to get the data from database randomly, i dont have problem either in database connection and generating random number,its working fine. but when i have to get the data from database with generated random no using absolute function , i am getting an exception
eg : rs.absolute(2);
i could not move to the second row of my result set.
not only absolute function whatever the function i am using except next method, getting exception.
my code :
package practical;
import java.util.*;
import java.sql.*;
public class gen {
Connection con;
Statement s;
ResultSet rs;
public void get(int t)
try
rs.absolute(t);
String question=rs.getString("question");
System.out.println("Random question : "+question);
catch(Exception e)
System.out.println("get error");
public void ran()
Random r=new Random();
for(int i=0;i<10;i++)
int j=r.nextInt(10);
System.out.println("random value : "+j);
if(j!=0)
try
get(j);
catch(Exception e)
System.out.println("ran error");
public void connect()
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:ds","sa","server");
s=con.createStatement();
rs=s.executeQuery("select question from qa");
ran();
con.close();
catch(Exception e)
System.out.println("error");
public static void main(String... strins)
new gen().connect();
}but i acheived through the code which is pasted below but i have to close the database connection for every iteration.
package practical;
import java.util.*;
import java.sql.*;
public class gen {
Connection con;
Statement s;
ResultSet rs;
public void get(int t)
int c=0;
while(c!=t)
try
rs.next();
c++;
catch(Exception e)
System.out.println("next error");
if(c==t)
{ try
String question=rs.getString("question");
System.out.println("Random question : "+question);
catch(Exception e)
System.out.println("iteration error");
public void ran()
Random r=new Random();
int j=r.nextInt(10);
System.out.println("random value : "+j);
if(j!=0)
try
get(j);
catch(Exception e)
System.out.println("ran error");
public void connect()
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:ds","sa","server");
s=con.createStatement();
rs=s.executeQuery("select question from qa");
ran();
con.close();
catch(Exception e)
System.out.println("error");
public static void main(String... strins)
for(int i=0;i<10;i++)
new gen().connect();
} -
Store the value in BLOB column data type
Hi All,
I have a file of about 5MB. I want to store this in BLOB column data type of a table.
Can we compress this file to store and when we take uncompress the same...or how do we do it.
and what is the procedure to store this....
pls. help me
Thanks,
NareshHi skud
i juast want to store the agent code to variable.if i did get ur point...
Why don't u just use a simple assign statment for example...
DECLARE
V_VALUE NUMBER;
BEGIN
V_VALUE := LC354 ; -- IF it was a value as LC354 static i mean
-- or u could use any value
V_VALUE := :ur_form_item_name; --- if it was dynamic
END;That's it .
Hope this helps...
Regards,
Ammatu Allah. -
How to store the value of sum of group in Crystal Report at the runtime!
Hello all,
I creates a Formula Field that hold the value of Sum of Group in Crystal Report. I would like to know how to store it in a variable and pass it to store procedure. Is it an option in Crystal report to do it. I knew that Crystal Report can cache the report for sharing. My detailed issue as following:
- Created a Formula Field named TOTAL AMOUNT that calculated the complex expression. This TOTAL AMOUNT is dynamic based on group and variables.
- I would like to store that value from TOTAL AMOUNT and pass it to the stored procedure parameter IN.
Any helps are much appreciated. Thanks.I doubt that this is possible since it would only calculate this value once the report has data. This sounds more like a report design question that should be asked over [here|SAP Crystal Reports;
Maybe you are looking for
-
Unable to boot from my USB Flash Memory Device
Hi there, I recently purchased a macbook pro with the lion 10.7.2 firmware. I am experiencing problems with my USB Flash memory as when i plug it in it comes up fine on the desktop and i can browse it. The problem is that when i open up an applicatio
-
Not happy with moving around keys on the timeline
I just changed from Final Cut to Premiere CS5.0 and I really like it. Working on a Macbook Pro i5 2.3GHZ, Mac OSX 10.7 But I am not happy with moving around on the timeline. I was used to using the up and down arrows to move to next video edit point,
-
I cannot get i-tunes. I tried the download, but no help. I get an error message The file "iTunes library itl" cannot be read because it was created by a newer version of iTunes. Any suggestions?
-
Creating a PDF from a secure website
I am attempting to create a PDF from a page within a secure website, which is successful, however the content on the page turns into random symbols. Could this be due to encryption on the site ?
-
Avoid marking files as modified by Git when there are no changes
Hello, I am working on a project using Visual Studio 2013 Ultimate and Enterprise Architect 9.0 (a UML tool). I am using Git for Source Control in Visual Studio. I have set up the programs so that I can synchronize code from Enterprise Architect (EA)