This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JDBC and the fly likes i need help with this code? plz Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "i need help with this code? plz" Watch "i need help with this code? plz" New topic
Author

i need help with this code? plz

Aa'ed Qarta
Greenhorn

Joined: Jun 05, 2004
Posts: 1
hey there,
i'm new to JDBC stuff, so i did my best to make a simple SQL editor for my university project. i need to know how to return my connection object in this code..




// sorry the code is long...but i really need this! :>


knowledge iz power
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26496
    
  78

I would strongly favor passing the SQL and just executing the query in one place rather than trying to pass the connection around. You don't want the connection open for longer than neccessary as it wastes resources.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: i need help with this code? plz
 
Similar Threads
Login page
mouseClicked event for the "Cancel button"
Applet Login via database
Applet Login via database
Connect to a remote host using JSch