looking at the title of your topic, i'd say your database isn't executing the query. Have a look at the autocommit setting of your database. It might be that you have to send a command to your database that it execute all entered queries.
I don't think your code works fine until "if (emeldate == Cdate);", as the error clearly says that there's a problem with the ResultSet, which are located above the if.
Replace this:
with:
and post the output, it will tell us a lot more
I assume you're using some class fields, as you don't set the type for certain variables? could you tell us which ones, that would make it easier as well
cheers,
UnrealEd