Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-13-2007, 03:30 PM
Senior Member
 
Join Date: Jun 2007
Posts: 164
Heather is on a distinguished road
without ODBC
Hi,
I'm a little bit new in Java, and I can open a data base SQLServer but I do with an ODBC, I know that when I want to run the application I need to create ODBC, is there any way to connect to the data base without ODBC?

this is my code
Code:
try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con = DriverManager.getConnection("jdbc:odbc:SIGSA", "sa", "admin"); stm = con.createStatement(); }
thank you

Last edited by Heather : 06-29-2007 at 04:27 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-13-2007, 04:22 PM
Senior Member
 
Join Date: Jun 2007
Posts: 119
Peter is on a distinguished road
You count with JDBC = Java Database Connectivity
This is the standard to connect to a data base from java. The API defines the method and interfaces to connect
You have to download the jar, and then put it in the classpath of your application
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-29-2007, 04:42 PM
Senior Member
 
Join Date: Jun 2007
Posts: 130
Jack is on a distinguished road
1. classpath = "path_of_files_jar"
2 add them to environment variables
3 in cmd write set classpath=".;path_of_files_jar"

and that is!
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using JDBC-ODBC bridge Java Tip Java Tips 0 02-06-2008 11:21 AM
[Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index leonard Database 1 08-06-2007 11:24 PM
Security Violation:attempt to use Restricted Class: sun.jdbc.odbc.JdbcOdbcDriver Heather Advanced Java 1 07-14-2007 07:59 PM
java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver Marcus Database 1 06-27-2007 07:57 PM


All times are GMT +3. The time now is 01:32 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org