Re: JAVA Developer

  • From: Mladen Gogala <mgogala@xxxxxxxxxxx>
  • To: Laimutis.Nedzinskas@xxxxxxxxxxxxx
  • Date: Tue, 09 Jan 2007 09:11:24 -0500

On 01/09/2007 08:53:27 AM, oracle-l-bounce@xxxxxxxxxxxxx wrote:

> so the so called prepared statement is treated as just another unprepared 
> statement. The code really should be as follows :
> 
> 
> begin
>   if statement in not yet prepared then 
>     parse statement
>   end if
> 
>   bind variables
>   execute statement
>   process results
> end
> 

Actually, the code should be as follows:

1) Create SQL class, throwing an exception if there is an error.
   Make sure that you have a method for binding objects for each class
   with objects that need to be used in SQL statements. 
   a great idea.
2) Provide extensions to classes you will be using in the program with the 
   methods to bind objects of those classes to SQL statements.
3) After doing that, create a class for status object, which will be returned 
by SQL.

4) Also, create a class for result set. Make sure that the class contains all 
the
   proper methods for session and state, so that it can be used as an EJB
5) After two months of fervent programming, go and ask your project manager 
what the heck did he
   want done, in the first place. This is so called "enigmatic development" 
paradigm.

Of course, a Perl script solving the problem could have been created in an hour 
or two,
but where is fun in that?
   


-- 
Mladen Gogala
http://www.mladen-gogala.com

--
//www.freelists.org/webpage/oracle-l


Other related posts: