cancel
Showing results for 
Search instead for 
Did you mean: 

how to enter data into Table UI and send to sql database

Former Member
0 Kudos

hi all,

I have a requirment where i need to enter data into UI table element which has to enter into sql database. can anyone suggest me how can i go about this.I'll be gratefull it you by reqarding some points.

sai sharan kalla

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

For Example if u have 3 input fields

create 3 value attributes under ValueNode which is binded to TableUI

Insert required no of inputfields in the columns of table.

bind the "value" property to the context attributes.

create a button "save"

//then get the entered values and place them in variables,say var1,var2,var3

//then in action of button write the following code to connect to backend

Class.forName("com.sap.dbtech.jdbc.DriverSapDB");

String url="jdbc:sapdb://<hostId>/J2E?sqlmode=ORACLE";

Connection con=DriverManager.getConnection(url,"SAPJ2EDB","admin");

Regards

LakshmiNarayana

Answers (2)

Answers (2)

Former Member
0 Kudos

problem solved

Former Member
0 Kudos

A very high level answer would be to write a EJB to insert data into SQL data base. Access the EJB from WebDynpro . Bind the context node to the table UI element . on click of a button read the data form the context node and call a method on the EJB and pass the data .. the EJB should take care of inserting the data into database.