How simple does it have to be???
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
How simple does it have to be???
How simple does it have to be???
How simple does it have to be???
Originally posted by Davy Kelly:
what code would I use to find a certain row, if it existed, so I can update that row or make a new row if that certain row does not exist?
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Well, not quite. That query will always return exactly one row. So you need to read it and extract the one column it contains. If the column is zero, there were no rows matching the query.Originally posted by Jeanne Boyarsky:
If rs.next() returns false, you need to add a row. If it returns true, the row exists.
Originally posted by Davy Kelly:
Hey everyone,
I have got a small test class working with MS Access.
I can create a table, insert columns and values to the table & drop the table.
But I am looking for a little bit of info.
I want to be able to create the table if it is not there, but use it if it is there, I was going to use an if statement for this:
How can I do this? how do I find the table is there or not?
I have searched google endlessly.
davy
[ April 22, 2007: Message edited by: Davy Kelly ]
Thanks and Regards,<br />-------------------<br />Parthasarathy Balakrishnan,<br />Bangalore.
How simple does it have to be???
How simple does it have to be???
How simple does it have to be???
Originally posted by Paul Clapham:
Well, not quite. That query will always return exactly one row. So you need to read it and extract the one column it contains. If the column is zero, there were no rows matching the query.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
How simple does it have to be???
How simple does it have to be???
How simple does it have to be???
How simple does it have to be???
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |