This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Delete a row by comparing two tables without frontend screen
Uma, Mula
Greenhorn
Joined: Aug 07, 2001
Posts: 6
posted
0
I am trying to compare two table data and if we happpen to delete a row in first table it has to delete in the second table also. And my program has to be bidirectional also. I mean it has to check from table 1 to 2 or 2 to 1 according to the requirement. Please tell me how to write a program for this application. thankyou uma
Originally posted by Uma, Mula: I am trying to compare two table data and if we happpen to delete a row in first table it has to delete in the second table also. And my program has to be bidirectional also. I mean it has to check from table 1 to 2 or 2 to 1 according to the requirement. Please tell me how to write a program for this application. thankyou uma
sounds like a database trigger would be more suitable here. If it is due to avoiding "orphaned" rows, you should have some sort of table relationships deal with this. Sounds like a lot of overhead to be maintaining the tables programmatically. Also, no one is going to write the program for you(for free). Give it your best shot, then post the relevant code if you are having troubles. If you don't know where to begin, try Sun's JDBC tutorials: http://java.sun.com/docs/books/tutorial/jdbc/index.html Jamie