Hi all, as mention in the given code I have taken the database in the respected String arrays, but instead to take in single array for each attribute ,I want to take in single String[] array for all database attribute.
Basically whenever I am inserting or selecting database the application of webdynpro is taking nearly 20 secs which I have to reduce it to nearly 4-5 secs... So I am thinking to take the entire database in a single array [] for insert or selection on it and update in the database only onceu2026
So plz guide me, how to resolve this database issue through single string [] array or is their in any other way to resolve, the reduction of time complexity of the runtime applications.
Try
{
String driver name="com.microsoft.jdbc.sqlserver.SQLServerDriver";
Class.forName (driver name);
String URL="jdbc:microsoft:sqlserver://**.*..**:1433;
Database Name=*****";
Conn=DriverManager.getConnection (URL,"sa","super");
Statement stmt=conn.createStatement ();
String insertion="Select * from Project ";
Prepared Statement pstmt=conn.prepareStatement (insertion);
Result Set rs=null;
Rs=pstmt.executeQuery ();
String Pname [] = new String [1];
String Tdesc [] = new String [1];
Date Sdate [] = new Date [1];
Date Edate [] = new Date [1];
String NOD [] = new String [1];
While (rs.next ())
{
For (int i=0; i<Pname.length; i++)
{
Pname<i> = rs.getString ("TASKNAME");
Tdesc<i> = rs.getString ("TASKDESC");
Sdate<i> = rs.getDate ("Sdate");
Edate<i> = rs.getDate ("Edate");
NOD<i> = rs.getString ("NOD");
PrivateArrayView.ITableElement element=wdContext.createTableElement ();
element.setTaskname (Pname<i>);
element.setTaskdesc (Tdesc<i>);
element.setStartdate (Sdate<i>);
element.setEnddate (Edate<i>);
element.setNOD (NOD<i>);
wdContext.nodeTable ().add Element (element);
}
Regards:
SK