DAL in oracle

Answer Posted / guest



public List<EEmployeeDetails> GetDetails(int
intEmpId, DateTime fromDate, DateTime toDate, int
intPageNo, int intPageSize, out int intTotalRecords, string
strOrderBy)
{
List<EEmployeeDetails> ListDetails = new
List<EEmployeeDetails>();
intTotalRecords = 0;
try
{
using (OracleDataReader objReader =
DataClient.ExecuteReader(ConnectionString,
CommandType.StoredProcedure, PROCEDURE_GET, GetDetailParams
(intEmpId, intReconciledstatus, fromDate, toDate,
intPageNo, intPageSize, strOrderBy)))
{
while (objReader.Read())
{
EEmployeeDetails
objEEmployeeDetails = new EEmployeeDetails();
if (!string.IsNullOrEmpty(objReader
["Employee_ID"].ToString()))
objEEmployeeDetails.EMPLOYEEId =
Convert.ToInt32(objReader["Employee_ID"]);
if (!string.IsNullOrEmpty(objReader
["EMPLOYEE_NUMBER"].ToString()))
objEEmployeeDetails.EMPLOYEENumber
= (string)(objReader["EMPLOYEE_NUMBER"]);
if (!string.IsNullOrEmpty(objReader
["EMPLOYEE_DATE"].ToString()))
if (!string.IsNullOrEmpty(objReader
["AMOUNT"].ToString()))
objEEmployeeDetails.Amount =
Convert.ToInt32(objReader["AMOUNT"]);
if (!string.IsNullOrEmpty(objReader
["TOTAL"].ToString()))
objEEmployeeDetails.Total =
Convert.ToInt32(objReader
["TOTAL"]);

intTotalRecords = Convert.ToInt32
(objReader["TOTAL"]);

ListDetails.Add
(objEEmployeeDetails);
}
}

}
catch (Exception ex)
{
bool rethrow =
ExceptionPolicy.HandleException(ex, "Propagate Policy");
if (rethrow)
{
throw ex;
}
}
return ListDetails;
}



///<summary>
///helper class for get details
///
/// </summary>
public static OracleParameter[] GetDetailParams(int
intEmpId, DateTime fromDate, DateTime toDate, int
intPageNo, int intPageSize, string strOrderBy)
{
OracleParameter[] sqlParams = null;
try
{
sqlParams = DataClient.GetCachedParameterSet
(ConnectionString, PROCEDURE_GET);
if (sqlParams == null || sqlParams.Length
== 0)
{
sqlParams = new OracleParameter[]
{
new OracleParameter(PARAM_ID,
OracleDbType.Int32),
new OracleParameter(PARAM_STATUS ,
OracleDbType.Int32),
new OracleParameter(PARAM_FROMDATE,
OracleDbType.Date),
new OracleParameter(PARAM_TODATE,
OracleDbType.Date),
new OracleParameter
(PARAM_RETURN,OracleDbType.Int32),
new OracleParameter(PARAM_REFCURSOR,
OracleDbType.RefCursor),
new OracleParameter(PARAM_PAGENUM,
OracleDbType.Int32),
new OracleParameter(PARAM_PAGESIZE,
OracleDbType.Int32),
new OracleParameter (PARAM_TOTALCOUNT,
OracleDbType.Int32),
new OracleParameter(PARAM_ORDERBY,
OracleDbType.Char)
};
DataClient.CacheParameterSet
(DataClient.CONN_STRING, PROCEDURE_GET, sqlParams);

sqlParams
[0].Direction=ParameterDirection.InputOutput;
sqlParams[0].Value = intEmpId;

sqlParams[2].Value = fromDate;
sqlParams[3].Value =
toDate;
sqlParams
[4].Direction=ParameterDirection.Output;
sqlParams
[5].Direction=ParameterDirection.Output;
sqlParams[6].Value = intPageNo;
sqlParams[7].Value = intPageSize;
sqlParams[8].Direction =
ParameterDirection.Output;
sqlParams[9].Value = strOrderBy;
}
}
catch (Exception ex)
{
var rethrow =
ExceptionPolicy.HandleException(ex, "Propagate Policy");
if (rethrow)
{
throw ex;
}
}
return sqlParams;
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can any body give me answer to this question please? please give me code in cl with the folling specifications. 1.Accept 2 parameters-date and date type 2.If date type is J then convert date to *MDY format 3.If date type is M convert date to *JUL format 4. Send a program message with the value of converted date? Please give me the answer.Because im practicing in my house.Im taking trining on AS/400.

1906


Write a Program for matrix multiplication.

501


1.Why does only one copy of a servlet object get created? What happens if you want to remove an old servlet object currently running but do not want to stop the entire servlet engine? 2.How does one servlet object deal with interactions from many browser? (e.g. if your servlet ran an email site, how can it keep track of hundreds of users logging in, reading their mail, etc.)

2378


plzzzzzzzzz xplain this code import java.awt.*; import java.awt.event.*; //import java.awt.MenuItem.*; public class MenuForm extends Frame implements ActionListener { MenuBar mb=new MenuBar(); Menu m1=new Menu("Master"); Menu m2 =new Menu("Transactions"); Menu m3=new Menu("Queries"); Menu m4=new Menu("Reports"); Menu m5=new Menu("Daily/Weekly"); Menu m6=new Menu("Housekeeping"); Menu m7=new Menu("About"); Menu m8=new Menu("Utilities/Tools"); Menu m9=new Menu("exit"); MenuItem m11=new MenuItem("consumer master"); MenuItem m12=new MenuItem(""); MenuItem m13=new MenuItem(""); MenuItem m21=new MenuItem("New Connection"); MenuItem m22=new MenuItem("Refill Booking"); MenuItem m23=new MenuItem("Shop Delivery"); MenuItem m51=new MenuItem("Mrk Dlry"); MenuItem m91=new MenuItem("Quit"); /*MenuItem m131=new MenuItem(" "); MenuItem m132=new MenuItem(" "); MenuItem m134=new MenuItem(" ");*/ Font f=new Font("TimesRoman",Font.BOLD,16); Frame f1; public static void main(String args[]) { new MenuForm().setVisible(true); } public MenuForm() { super("Gas Agency Main Menu"); setSize(1280,800); setBackground(Color.lightGray); setLayout(null); setMenuBar(mb); /*m1.setFont(new Font("TimesRoman", Font.BOLD,16)); m2.setFont(new Font("TimesRoman", Font.BOLD,16)); m3.setFont(new Font("TimesRoman", Font.BOLD,16));*/ mb.add(m1); mb.add(m2); mb.add(m3); mb.add(m4); mb.add(m5); mb.add(m6); mb.add(m7); mb.add(m8); mb.add(m9); m1.add(m11); m1.add(m12); m1.add(m13); m2.add(m21); m2.add(m22); m2.add(m23); m5.add(m51); m9.add(m91); //m3.add(m31); /*m13.setEnabled(false); m13.add(m131); m13.add(m132); m13.add(m133); m13.add(m134); m13.add(m135);*/ setVisible(true); /*m11.addActionListener(this); m12.addActionListener(this); m13.addActionListener(this); m2.addActionListener(this); m3.addActionListener(this);*/ m21.addActionListener(this); m22.addActionListener(this); m23.addActionListener(this); /*m31.addActionListener(this); m131.addActionListener(this); m132.addActionListener(this); m133.addActionListener(this); m134.addActionListener(this); m135.addActionListener(this);*/ m51.addActionListener(this); m91.addActionListener(this); } public void actionPerformed(ActionEvent e) { /*if(e.getSource()==m11) { } if(e.getSource()==m12) { } if( (e.getSource()==m131) || (e.getSource() ==m132) || (e.getSource()==m133) || (e.getSource()==m134) || (e.getSource()==m135) ) { }*/ if(e.getSource()==m21) { NewConnection nc=new NewConnection (); nc.setVisible(true); this.dispose(); } if(e.getSource()==m22) { RefillBooking rb=new RefillBooking (); rb.setVisible(true); this.dispose(); } if(e.getSource()==m23) { ShopDelivery sd=new ShopDelivery(); sd.setVisible(true); this.dispose(); } if(e.getSource()==m51) { MarkDelivery mrk=new MarkDelivery(); mrk.setVisible (true); this.dispose(); } if(e.getSource()==m91) { this.dispose(); System.exit(0); } } }

1669


You have been asked to install a servlet engine (tomcat, glassfish, etc.) for a companies servlets. Assuming the company has an existing web/DBMS server (which may or may not be on the same server), explain in detail how would you implement the development project and a deployment solution.

2127






can any one give me code to keyed a flat file and used chain in RPGLE to search any item

1706


import java.awt.*; import java.awt.event.*; public class Agency extends Frame implements ActionListener { Label l1,l2,l3,l4; Button b1; TextField t1,t2; String s1,s2,s3,s4; public static void main(String args[]) { new Agency().setVisible(true); } public Agency() { super("Gas Agency Package"); setSize(1280,800); setBackground(Color.lightGray); setLayout(null); // setLayout(new BorderLayout()); t1=new TextField(20); t1.setBounds(440,150,200,30); t1.setBackground(Color.white); t2=new TextField(20); t2.setBounds(440,180,200,30); t2.setBackground(Color.white); t2.setEchoChar('*'); l1=new Label("Gas Agency Package"); l1.setBounds(400,30,300,50); l1.setFont(new Font("TimesRoman",Font.BOLD,25)); l1.setAlignment(Label.CENTER); l2=new Label("Enter your ID and Passoword"); l2.setFont(new Font("TimesRoman",Font.BOLD,20)); l2.setBounds(270,80,300,50); l3=new Label("Enter ID"); l2.setFont(new Font ("TimesRoman",Font.BOLD,20)); l3.setBounds(270,150,120,50); l4=new Label("Enter Passoword"); l2.setFont(new Font ("TimesRoman",Font.BOLD,20)); l4.setBounds(270,180,140,50); add(l1); add(l2); add(l3); add(t1); add(l4); add(t2); b1=new Button("Login"); b1.setBackground(Color.white); b1.setBounds(400,280,100,70); b1.addActionListener(this); add(b1); } public void actionPerformed(ActionEvent e) { if(e.getSource()==b1) { s3="svce"; s4="svce"; s1=t1.getText(); s2=t2.getText(); if(s1.equals(s3) && s2.equals(s4)) { //System.out.println("password is correct"); MenuForm m= new MenuForm(); m.setVisible(true); //this.dispose(); } else { System.out.println("password not correct"); } this.dispose(); } } } plzzzzzzz xplain me this java code like why i m including this packages n the whole code plzzzzzz

1962


I have multiple datasets and I have to search a particular string in all of them at a single time. Please suggest a full jcl or rexx tool for it.

700


Devise a program to implement the Fibonacci sequence.

534


plzzzzzzzzz xplain this code import java.awt.*; import java.awt.event.*; public class Agency extends Frame implements ActionListener { Label l1,l2,l3,l4; Button b1; TextField t1,t2; String s1,s2,s3,s4; public static void main(String args[]) { new Agency().setVisible(true); } public Agency() { super("Gas Agency Package"); setSize(1280,800); setBackground(Color.lightGray); setLayout(null); // setLayout(new BorderLayout()); t1=new TextField(20); t1.setBounds(440,150,200,30); t1.setBackground(Color.white); t2=new TextField(20); t2.setBounds(440,180,200,30); t2.setBackground(Color.white); t2.setEchoChar('*'); l1=new Label("Gas Agency Package"); l1.setBounds(400,30,300,50); l1.setFont(new Font("TimesRoman",Font.BOLD,25)); l1.setAlignment(Label.CENTER); l2=new Label("Enter your ID and Passoword"); l2.setFont(new Font("TimesRoman",Font.BOLD,20)); l2.setBounds(270,80,300,50); l3=new Label("Enter ID"); l2.setFont(new Font ("TimesRoman",Font.BOLD,20)); l3.setBounds(270,150,120,50); l4=new Label("Enter Passoword"); l2.setFont(new Font ("TimesRoman",Font.BOLD,20)); l4.setBounds(270,180,140,50); add(l1); add(l2); add(l3); add(t1); add(l4); add(t2); b1=new Button("Login"); b1.setBackground(Color.white); b1.setBounds(400,280,100,70); b1.addActionListener(this); add(b1); } public void actionPerformed(ActionEvent e) { if(e.getSource()==b1) { s3="svce"; s4="svce"; s1=t1.getText(); s2=t2.getText(); if(s1.equals(s3) && s2.equals(s4)) { //System.out.println("password is correct"); MenuForm m= new MenuForm(); m.setVisible(true); //this.dispose(); } else { System.out.println("password not correct"); } this.dispose(); } } } plzzzzzzzzz xplain this code

1549


1.What type of material can be sent from a Java servlet to a browser ? How does the browser know how to deal with the material? 2.Explain what happens to a servlet when a servlet engine is sent a GET request.

2374


How to get the version(major,minor,revision ) of VB6.0 delphi code .I am able to fetch dll file of vb6.0 but not vba file .Can u send me the code snippet in delphi to get the value for vb6.0.

3452


Write code to make an object work like a 2-d array?

480


I have a file which contains so many lines and variable number of lines are treated as a record. For example *first ooooo xxxxx ttttt mmmm vvvvvvv *end uuu bbbb *first kkkkvvvvvv nnnn mmmmm kkkkk fffff gggg ffff kkkk lllll *end. Here the lines from *first to *end are treated as a record. The number of lines between *first and *end is not same for all the records. Suppose there are 100 records (or number of records are not predefined)like the format given in the above example. Now the entire file needs to split into two files, first having 40 and remaining in the second file. Can we split using sort utility? If possible then what is the sort card?

1781


find out the list of users who have access to all t-codes starts with 'SU'? thanks in advance all.

2019