A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
A Question on JDBC URLs
Joined: Mar 08, 2006
Sep 21, 2010 03:39:16
I have seen some books write
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/test?", "", ""); //Note the ?
while others write
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "", ""); // No ? Here
I was wondering which is better and why? What does the ? do?
Joined: Oct 27, 2005
Sep 21, 2010 04:03:49
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions
How To Answer Questions
Joined: Sep 29, 2008
Sep 21, 2010 05:25:17
It (likely) doesn't do anything, if there aren't any parameters.
I agree. Here's the link:
subject: A Question on JDBC URLs
whats wrong here in connection string
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014