Hi surya,

This is just rough design of database bean.

You pass four variable.

(int a,string b,string c,string[][][][] d)

Note : define one public record set in this bean.

1. Total no of arguments (no of variable in procedure).

2. Select any one operation.
INSERT / UPDATE / SELECT / .......... you may extent any thing.

3. Procedure Name (may optional)

4. Variable Name + Variable Type + In/Out type variable + Value (may be
input or output), Basically it's four dimension array. String array[][][][].
   Array first cell is any variable name like a,b,c,d...... (this you
require to retry the value of output variable)

   Array second cell contains Variable Type i.e. String, Integer, Date,
.......

   Array third cell contains In / Out type required in executing a
procedure.

   Array four cell contains Actual passing value with IN parameter. Out type
may set value to pass variable, This value set in this cell, In your front
end bean you retry this value with reference to first cell.


With first look, you may realize we don't require first cell, i think it
will require for all operations.


So database bean is look like this.


If b = insert
 if (c is not null)
 {
  // build procedure parameter.
  while(int i=0 <  a)
  {
   cs.clearParameters();
   if (d type is int)
    cs.setInt();
   if (d type is string)
    cs.setString();
   .......

   // excute query.

   // store out variable in fourth field.
  }
 }
 else
 {
  make full string and execute.
 }

if b = update
 if (c is not null)
 {
  // build procedure parameter.

  // same operation like insert query.

  // may store output result in fourth field of our array and access result
through first field.
 }
 else
 {
  make full string and execute.
 }

if b = select
 make full string.
 store result in our public recordset.
 make full string and store result in this public record set.
end.


This is just rough design, Still lot of modification is required.

Regards,
Bhavesh.

----- Original Message -----
From: Surya Prakash <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 28, 1999 8:06 AM
Subject: Re: JSP debugging


> hi bhavesh
> i will explain the scenarion, we have jsp pages and they talk to process
> bean first and process bean talks to database bean which is common one for
> every jsp pages one process bean is there
> can u suggest me on coding part of select, update and insert statements
> which depends upon the values entered and selections made on user
interface,
> tia
> surya
> ----- Original Message -----
> From: Bhavesh Vakil <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, December 28, 2000 4:56 PM
> Subject: JSP debugging
>
>
> > Hi to all,
> >
> > I use JSP from long time. JSP is much superior and flexible then any
other
> > web tech, but I think debugging part in JSP is very poor as compare to
> other
> > tech.
> >
> > What is a best way to debug JSP pages without IDE support.
> >
> > Regards,
> >
> > Bhavesh.
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
>
===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to