Retrieving data from SQL Server

R

Roy Huxley

Hi,

I need to write a Java program to retrieve data from MS SQL Server.

Can anybody provide some sample code? I am confused here coz I dont
know what I need to set up, like, SQL server IP address? is this
required? Do I also require a TCP/IP port number?

Thanks,
Roy
 
M

Miguel De Anda

Roy Huxley said:
Hi,

I need to write a Java program to retrieve data from MS SQL Server.

Can anybody provide some sample code? I am confused here coz I dont
know what I need to set up, like, SQL server IP address? is this
required? Do I also require a TCP/IP port number?

Thanks,
Roy


Have you tried to look for stuff online? There are tons of examples. Try the
java.sun.com site and look up jdbc and sql stuff. You'll surely find
something.
 
D

Daniel Schneller

Have you tried to look for stuff online? There are tons of examples. Try the
java.sun.com site and look up jdbc and sql stuff. You'll surely find
something.

Microsoft has a free JDBC driver for the SQL Servers 7 and 2000. It is
available from their website
http://www.microsoft.com/sql/downloads/jdbcregister.asp. You will need
to register a passport account if you don't have one already.
This driver is much preferable over the jdbc-odbc brige driver, as the
latter offers only a very limited level of functionality. For first
steps it should suffice however.

Daniel
 
D

David Segall

Daniel Schneller said:
Microsoft has a free JDBC driver for the SQL Servers 7 and 2000. It is
available from their website
http://www.microsoft.com/sql/downloads/jdbcregister.asp. You will need
to register a passport account if you don't have one already.
This driver is much preferable over the jdbc-odbc brige driver, as the
latter offers only a very limited level of functionality. For first
steps it should suffice however.

Daniel
Does the driver also work with Microsoft SQL Server Desktop Engine
(MSDE) which is the "free" SQL Server compatible database engine. I am
asking because I really like MS Access as a database front end and it
can be used with MSDE.
 
T

Thomas Kellerer

David said:
Does the driver also work with Microsoft SQL Server Desktop Engine
(MSDE) which is the "free" SQL Server compatible database engine. I am
asking because I really like MS Access as a database front end and it
can be used with MSDE.
Yes it does

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top