Hi, Can anyone tell me how to write a prepared statement in a servlet?? i need to have 4 things, that are the select, insert, update and delete. how do i write the prepared statement for the 4 things?? is it using 4 prepared statements or only need just 1 prepared statement?? Thanx in advance...
Originally posted by Ann Toh: Hi, Can anyone tell me how to write a prepared statement in a servlet?? i need to have 4 things, that are the select, insert, update and delete. how do i write the prepared statement for the 4 things?? is it using 4 prepared statements or only need just 1 prepared statement?? Thanx in advance...
you write it the same way you would for a normal app! You will need a separate prepared statement for each part ( select, update...). In fact you'll need a new prepared statement for each query in which something other than the set parameters change. The only diff between a servlet and normal app may be the design ( connection pooling and other design features specific to web apps ).
The glass is neither half full or half empty. It is too big. But this tiny ad is just right:
a bit of art, as a gift, that will fit in a stocking