File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
REST with Spring (video course)
this week in the
JDBC and Relational Databases
jdbc connection in main method
Joined: Oct 15, 2009
Oct 15, 2009 08:40:40
is it mandatory to make
connection in main method;i tried to use it in event handling method of a button and it gives no response and no errors
Joined: Mar 17, 2008
Oct 15, 2009 08:59:22
Not at all. You should make a separate Connection class for JDBC. Did your code in event handling method includes any output statement??
Joined: Oct 13, 2005
Oct 15, 2009 09:54:08
You ought not to have a connection in the main method. Use the main method to start the application and nothing else.
I agree. Here's the link:
subject: jdbc connection in main method
VAJ Oracle connection problem
id of the new field in my table
Hibernate static SessionFactory
Validating user/password for database connection
JDBC Connection Interface
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015