Java Doc for Driver.java in  » Database-JDBC-Connection-Pool » octopus » com » internetcds » jdbc » tds » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database JDBC Connection Pool » octopus » com.internetcds.jdbc.tds 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.internetcds.jdbc.tds.Driver

All known Subclasses:   com.internetcds.jdbc.tds.SybaseDriver,
Driver
public class Driver implements java.sql.Driver(Code)

The Java SQL framework allows for multiple database drivers.

Each driver should supply a class that implements the Driver interface.

The DriverManager will try to load as many drivers as it can find and then for any given connection request, it will ask each driver in turn to try to connect to the target URL.

It is strongly recommended that each Driver class should be small and standalone so that the Driver class can be loaded and queried without bringing in vast quantities of supporting code.

When a Driver class is loaded, it should create an instance of itself and register it with the DriverManager. This means that a user can load and register a driver by doing Class.forName("foo.bah.Driver").
author:
   Craig Spannring
author:
   Igor Petrovski
version:
   $Id: Driver.java,v 1.2 2007-10-19 13:21:40 sinisa Exp $
See Also:   DriverManager
See Also:   Connection



Field Summary
final public static  StringcvsVersion
    
final static  booleandebug
    
final static  StringdefaultSQLServerPort
    
final static  StringdefaultSybasePort
    
final static  StringnewSQLServerUrlPrefix
    
final static  StringoldSQLServerUrlPrefix
    
final static  StringsybaseUrlPrefix
    

Constructor Summary
public  Driver()
    

Method Summary
public  booleanacceptsURL(String url)
     Returns true if the driver thinks it can open a connection to the given URL.
public  java.sql.Connectionconnect(String Url, Properties info)
     Try to make a database connection to the given URL.
public  intgetMajorVersion()
    
public  intgetMinorVersion()
     Get the driver's minor version number.
public  DriverPropertyInfo[]getPropertyInfo(String Url, Properties Info)
    

The getPropertyInfo method is intended to allow a generic GUI tool to discover what properties it should prompt a human for in order to get enough information to connect to a database.

public  booleanjdbcCompliant()
     Report whether the Driver is a genuine JDBC COMPLIANT (tm) driver. A driver may only report "true" here if it passes the JDBC compliance tests, otherwise it is required to return false. JDBC compliance requires full support for the JDBC API and full support for SQL 92 Entry Level.
protected  booleanparseUrl(String url, Properties result)
     Parses the properties specified in url and adds them to result.

Field Detail
cvsVersion
final public static String cvsVersion(Code)



debug
final static boolean debug(Code)



defaultSQLServerPort
final static String defaultSQLServerPort(Code)



defaultSybasePort
final static String defaultSybasePort(Code)



newSQLServerUrlPrefix
final static String newSQLServerUrlPrefix(Code)



oldSQLServerUrlPrefix
final static String oldSQLServerUrlPrefix(Code)



sybaseUrlPrefix
final static String sybaseUrlPrefix(Code)




Constructor Detail
Driver
public Driver() throws SQLException(Code)
Construct a new driver and register it with DriverManager
exception:
  SQLException -




Method Detail
acceptsURL
public boolean acceptsURL(String url) throws SQLException(Code)
Returns true if the driver thinks it can open a connection to the given URL. Typically, drivers will return true if they understand the subprotocol specified in the URL and false if they don't. This driver's protocols start with jdbc:freetds: This driver handles URLs of the form:
 jdbc:freetds://host:port/database
 
or
 jdbc:freetds://host/database
 
 jdbc:freetds:sqlserver://host:port/database
 
or
 jdbc:freetds:sqlserver://host/database
 
 jdbc:freetds:sybase://host:port/database
 
or
 jdbc:freetds:sybase://host/database
 

See Also:   java.sql.Driver.acceptsURL
Parameters:
  url - the URL of the driver true if this driver accepts the given URL
exception:
  SQLException - if a database-access error occurs



connect
public java.sql.Connection connect(String Url, Properties info) throws SQLException(Code)
Try to make a database connection to the given URL. The driver should return "null" if it realizes it is the wrong kind of driver to connect to the given URL. This will be common, as when the JDBC driverManager is asked to connect to a given URL, it passes the URL to each loaded driver in turn.

The driver should raise an SQLException if it is the right driver to connect to the given URL, but has trouble connecting to the database.

The java.util.Properties argument can be used to pass arbitrary string tag/value pairs as connection arguments. This driver handles URLs of the form:

 jdbc:freetds://servername/database 
 jdbc:freetds://servername:port/database
 jdbc:freetds:sqlserver://servername/database 
 jdbc:freetds:sqlserver://servername:port/database
 jdbc:freetds:sybase://servername/database 
 jdbc:freetds:sybase://servername:port/database
 

Recognized Properties
PROGNAMESend this name to server to identify the program
APPNAMESend this name to server to identify the app

Parameters:
  url - the URL of the database to connect to
Parameters:
  info - a list of arbitrary tag/value pairs as connectionarguments a connection to the URL or null if it isnt us
exception:
  SQLException - if a database access error occurs
See Also:   java.sql.Driver.connect




getMajorVersion
public int getMajorVersion()(Code)
Gets the drivers major version number the drivers major version number



getMinorVersion
public int getMinorVersion()(Code)
Get the driver's minor version number. Initially this should be 0.



getPropertyInfo
public DriverPropertyInfo[] getPropertyInfo(String Url, Properties Info) throws SQLException(Code)

The getPropertyInfo method is intended to allow a generic GUI tool to discover what properties it should prompt a human for in order to get enough information to connect to a database. Note that depending on the values the human has supplied so far, additional values may become necessary, so it may be necessary to iterate though several calls to getPropertyInfo.
Parameters:
  url - The URL of the database to connect to.
Parameters:
  info - A proposed list of tag/value pairs that will be sent onconnect open. An array of DriverPropertyInfo objects describing possibleproperties. This array may be an empty array if no propertiesare required.
exception:
  SQLException - if a database-access error occurs.




jdbcCompliant
public boolean jdbcCompliant()(Code)
Report whether the Driver is a genuine JDBC COMPLIANT (tm) driver. A driver may only report "true" here if it passes the JDBC compliance tests, otherwise it is required to return false. JDBC compliance requires full support for the JDBC API and full support for SQL 92 Entry Level. It is expected that JDBC compliant drivers will be available for all the major commercial databases. This method is not intended to encourage the development of non-JDBC compliant drivers, but is a recognition of the fact that some vendors are interested in using the JDBC API and framework for lightweight databases that do not support full database functionality, or for special databases such as document information retrieval where a SQL implementation may not be feasible.



parseUrl
protected boolean parseUrl(String url, Properties result)(Code)
Parses the properties specified in url and adds them to result. true if the URL could be parsed successfully.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.