Click to See Complete Forum and Search --> : JDBC help
eyes0cket
September 16th, 2004, 04:43 PM
I am currently reading Head first servlets and jsp so that I can make a nice front end to my MS SQL database at work, but I will also need a good resource on connecting to a ms sql database with java. Is there any good books on this anyone would suggest?
Originally I was going to do it with mysql and got the book java and mysql however the code was completly wrong becuase the connector guidelines changed before the book was in the wild for more then a few months.
Davey
September 16th, 2004, 05:15 PM
Do the following help?
http://support.microsoft.com/default.aspx?scid=kb;en-us;313100
eyes0cket
September 17th, 2004, 10:04 AM
Thank you, I will try that out today, any other suggestions on Ms Sql and java send em over I need all the help I can get
cjard
September 17th, 2004, 11:44 AM
note that the KB article Davey refers to requires you to have some software that is proprietary and property of microsoft. You might not have a license for this software, nor are there any guarantees that you have the necessary jars...
there are some free drivers for sqlserver, and you can always use an odbc connection via the bridge (not for production software)
FreeTDS is one of the free drivers i recall.. any driver touting Tabular Data Stream ability could be compatible with sql server...
eyes0cket
September 17th, 2004, 01:52 PM
Thanx for the info
I hate microsoft products they are such a pain, licence this licenence that bla bla bla bla bla
If I had it my way everyone in the world would be running BSD systems
Hopefully I can get this thing to work, I will try that FreeTDS driver and see how that goes
Davey
September 18th, 2004, 07:12 AM
I've also used the FreeTDS and it works well also.
eyes0cket
September 22nd, 2004, 10:51 AM
I just checked on freetds and its for unix and linux, I am on a windows 2000 server with sql server 2000
eyes0cket
September 22nd, 2004, 12:53 PM
ok I connected with microsofts drivers and made the classpaths and I am testing the server with this code and it says there is an error on connection line, anyone know why?????????
public class Connect {
public static void main(String[] args) {
try {
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
error on this line------> Connection conn = DriverManager.getConnection
("jdbc:microsoft:sqlserver://PC218:1433","obrown","helloo1");
} catch (Exception E) {
System.out.println("JDBC Driver error");
}
}
}
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.