On Friday 03 March 2006 3:17 am, Rhys Campbell wrote:
> Hi Rajesh,
>
>
>
> I can post some code later when I return from work. My app is written
> using Java and uses a single table Derby database. At present this only
> has three records in it. I did try to completely shutdown Derby at the
> end of one class before restarting it in the class that had the problem.
> This had no effect on the "No current connection" issue. I am using the
> same supporting classes and so the code to access the database is also
> the same.
>
>
>
Uhm,
Just shooting from the hip....
(Or rather an under educated guess...)
Where are you defining your Connection class variable?
I mean this sounds like a scope issue.
If you're saying:
try{
Connection con = Connection(....);
...
} catch( SQLException ex){
...
}
Your problem is in the scope of the variable.
If this is the case, then try:
Connection con = null;
try{
con = new Connection(...);
} catch (...){
....
}
Or you can make the scope of your Connection variable at the class level.
HTH...