A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
JDBC and Relational Databases
Running jdbc methods from my application
Joined: Apr 09, 2004
Oct 28, 2004 12:26:00
I have a jdbc.class which executes queries etc.
I also have an application class.
When the app runs I'd like to to execute some methods in the
to perform queries, how do I go about doing this?
I know how to call methods but I have to pass the connection paramter which has not been setup in my applicatoin class.
author & internet detective
Joined: May 26, 2003
Oct 28, 2004 17:48:00
I would recommend having a separate class that handles creating the connection. Then your class containing the JDBC can call it and you don't need to pass the connection around all over.
OCA 8 book
How To Ask Questions The Smart Way
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
I agree. Here's the link:
subject: Running jdbc methods from my application
JDBC application running very slow
database-access JavaBean - thread safety
How to do JNDI lookup?
Excelsheet content reading
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015