RE: Java Help
Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information on it. Samuel Johnson (1709 - 1784) Learn from http://java.sun.com or http://www.google.com José. -Original Message- From: Zille Hassan [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 10:23 AM To: Struts Users Mailing List Subject: Java Help Hey Guys really new to this java stuff So can someone tell me how do I connect to my DB using ODBC All I remember is Class.forName(sun.jdbc.odbc.JdbcOdbc:) So how do I connect to my DB guys Regds Zille - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Help
I don't know why you would use Java to connect to a db using ODBC; you would have to use a Type I driver and they are notoriously inefficient, thanks to M$uck's proprietary intransigence. Regardless, buy a copy of White, et al, JDBC API Tutorial and Reference, 2d ed. (Addison Wesley 1999). Mark -Original Message- From: Zille Hassan [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 4:23 AM To: Struts Users Mailing List Subject: Java Help Hey Guys really new to this java stuff So can someone tell me how do I connect to my DB using ODBC All I remember is Class.forName(sun.jdbc.odbc.JdbcOdbc:) So how do I connect to my DB guys Regds Zille - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Help
Or, even better, cheaper, with a better ROI: learn to help yourself. Try checking out http://java.sun.com -- look for the links that say tutorial or api. From: Mark Galbreath [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: Java Help Date: Thu, 7 Aug 2003 08:14:04 -0400 I don't know why you would use Java to connect to a db using ODBC; you would have to use a Type I driver and they are notoriously inefficient, thanks to M$uck's proprietary intransigence. Regardless, buy a copy of White, et al, JDBC API Tutorial and Reference, 2d ed. (Addison Wesley 1999). Mark -Original Message- From: Zille Hassan [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 4:23 AM To: Struts Users Mailing List Subject: Java Help Hey Guys really new to this java stuff So can someone tell me how do I connect to my DB using ODBC All I remember is Class.forName(sun.jdbc.odbc.JdbcOdbc:) So how do I connect to my DB guys Regds Zille - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Help
Zille, following would be the rough steps that you'd have to do for accessing from a normal java class... 1. set the jdbc.drivers property of the system to the full path name of the driver 2. Call the getConnection method of the DriverManager class by passing the URL of the database however if you are planning to access the DB from inside a web application, it is advisable to create a data source corresponding to the database in the server and access the same using JNDI. something like Context ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup(java:comp/env/jdbc/myDataSource); conn = ds.getConnection(); where myDataSource is the data source name that you provided while creating the JNDI entry... hope this helps ansu -Original Message- From: Zille Hassan [mailto:[EMAIL PROTECTED] Sent: Thursday, August 07, 2003 1:53 PM To: Struts Users Mailing List Subject: Java Help Hey Guys really new to this java stuff So can someone tell me how do I connect to my DB using ODBC All I remember is Class.forName(sun.jdbc.odbc.JdbcOdbc:) So how do I connect to my DB guys Regds Zille - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]