Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Servlets
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Servlets
Connect servlet to MySQL using NetBeans IDE 4.1
Maria Mina
Greenhorn
Posts: 2
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello
I am coding a connection and is not connecting.
Here is my coding:
public authBean() { try { Class.forName("com.mysql.jdbc.Driver"); cn = DriverManager.getConnection("jdbc:mysql://localhost/lmpumps?user=lmpumps&password=DWA"); } catch (Exception e) { System.out.println(e.getMessage()); } }
'lmupums' is my db name
'lmupums' is the username and 'DWA' is the password
Where is my error? Can you please help me?
sai prasanna
Ranch Hand
Posts: 167
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
hi
i dont know about the current driver you are using
but try with this code
Class.forName("org.gjt.mm.mysql.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/lmpumps?user=lmpumps");
regards
saiprasanna
aditya seth
Greenhorn
Posts: 11
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
what errors u r getting?
Ben Souther
Sheriff
Posts: 13411
I like...
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Aditya,
Please see:
http://faq.javaranch.com/view?UseRealWords
You are correct though.
We would need to see the error message in order to be of more assistance.
Maria,
Is this a even
servlet
app?
Java API
J2EE API
Servlet Spec
JSP Spec
How to ask a question...
Simple Servlet Examples
jsonf
What's brown and sticky? ... a stick. Or a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
help in coding
Error with jsp and JavaBeans
Update problem
How Do You Say "J2EE"??
Passwords
More...