Statement object
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Shila_Patel
Posted On:   Monday, September 9, 2002 03:25 AM

Several of my tables have an auto-increment column. When I delete one a record I need the numbers to change such that they remain in order.

I am trying to write a generic servlet as I will not always know how many rows there are in each table. Having got this information, do I need to have a separate Statement object for each update, if so will an array of Statement objects work.

At the moment I keep getting a null pointer error. I ahve also tried having one Statement object and setting it to null within a loop before using it.

Any help would be greatly appreciated

Re: Statement object

Posted By:   Anonymous  
Posted On:   Monday, September 9, 2002 06:37 AM

Updating ids to maintain the sequence is a bad idea, because is you delete the first row, you need to update all other rows, which just kills performance... Why do you need to maintain the order anyway???
About | Sitemap | Contact