This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Get Data from SQL to my java program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Get Data from SQL to my java program" Watch "Get Data from SQL to my java program" New topic
Author

Get Data from SQL to my java program

Andrew Cho
Ranch Hand

Joined: Jun 29, 2011
Posts: 50
Hey all,

How do I get data from SQL (a file or server, I don't really know) so that I can use it in my java program (which is a GUI)?
I have a url(***.****.net), a server (i think?), a username and a password.

thanks
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

"JDBC" is the keyword you're looking for.
Andrew Cho
Ranch Hand

Joined: Jun 29, 2011
Posts: 50
hye paul.
well I think I have JDBC installed, but I don't really know where to go from there. It seems to me that I need to install a driver that connects to my SQL such as SQL server, or jDTS and also select classpaths and other thing that I don't know. Does this sound right?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

JDBC is part of Java. Yes, you need a JDBC driver. I suggest reading the JDBC tutorial.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37907
    
  22
Paul Clapham wrote:. . . I suggest reading the JDBC tutorial.
Agree. It's really useful. Start here.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

Moving to our very own JDBC forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
Andrew Cho wrote:hye paul.
well I think I have JDBC installed,


bit curious - is JDBC a software or a platform. Is jar files enough to create java programs to communicate with DB?
 
wood burning stoves
 
subject: Get Data from SQL to my java program
 
Similar Threads
connection to mssql server database
No suitable driver found for JDBC
Date Type
JDBC with MS SQL Server 2000
Java and MS SQL Server 2000