|
|
|||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||
java.lang.Object
|
+--com.inet.tds.TdsDriver
|
+--com.inet.tds.TdsDataSource
This class is an implementation of a simple DataSource for the driver i-net OPTA(tm).
| Field Summary | |
static int |
MODE_SQLSERVER_65
SQL Server 6.5 compatible mode. |
static int |
MODE_SQLSERVER_70
SQL Server 7.0 or higher mode. |
static int |
MODE_SQLSERVER_70_ASCII
SQL Server 7.0 ASCII or higher mode. |
| Constructor Summary | |
TdsDataSource()
Attempt to create a Datasource. |
|
TdsDataSource(java.util.Properties info)
Attempt to create a Datasource with the given properties. |
|
| Method Summary | |
java.lang.Object |
clone()
Create a new object of the same class like this DataSource. |
boolean |
equals(java.lang.Object obj)
Compare this DataSource to the specified object. |
java.lang.String |
getCharset()
Return the charset for the connection. |
java.sql.Connection |
getConnection()
Attempt to establish a connection to the database. |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password)
Attempt to establish a connection to the database. |
java.lang.String |
getDatabaseName()
Return the first database name of the connection after login. |
java.lang.String |
getDescription()
Return a one line description of the DataSource. |
java.lang.String |
getInstanceName()
Return the instance name of the MS SQL Server. |
int |
getLoginTimeout()
Returns the timeout for login. |
java.io.PrintWriter |
getLogWriter()
|
int |
getMode()
Get the protocol mode of the driver. |
java.lang.String |
getPassword()
Return the password for the connection. |
java.lang.String |
getPort()
Return the TCP/IP port number of the MS SQL Server. |
int |
getPortNumber()
Return the TCP/IP port number of the MS SQL Server. |
java.util.Properties |
getProperties()
Get all properties of the DataSource without LoginTimeout and LogWriter. |
java.lang.String |
getProperty(java.lang.String name)
Get any property of the DataSource without LoginTimeout and LogWriter. |
int |
getQueryTimeout()
Returns the default query timeout for all statements. |
javax.naming.Reference |
getReference()
|
java.lang.String |
getServerName()
Return the server name of the MS SQL Server. |
boolean |
getSqlServer7Mode()
Deprecated. See setMode |
boolean |
getUseCursorsAlways()
Get the flag useCursorsAlways of the driver. |
java.lang.String |
getUser()
Return the user for the connection. |
void |
setCharset(java.lang.String charset)
Set the charset for the connection. |
void |
setDatabaseName(java.lang.String databaseName)
Set the first database name of the connection after login. |
void |
setDescription(java.lang.String description)
Set the description of the DataSource. |
void |
setInstanceName(java.lang.String serverName)
Set the instance name of the MS SQL Server. |
void |
setLoginTimeout(int seconds)
Set the login timeout for the connection. |
void |
setLogWriter(java.io.PrintWriter out)
|
void |
setMode(int mode)
Set the protocol mode of the driver. |
void |
setPassword(java.lang.String password)
Set the password for the connection. |
void |
setPort(java.lang.String port)
Set TCP/IP port number of the MS SQL Server. |
void |
setPortNumber(int portNumber)
Set TCP/IP port number of the MS SQL Server. |
void |
setProperties(java.util.Properties properties)
Set all properties of the DataSource without LoginTimeout and LogWriter. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Set any property of the DataSource without LogWriter. |
void |
setProperty(java.lang.String name,
java.lang.String value)
Set any property of the DataSource without LogWriter. |
void |
setQueryTimeout(int seconds)
Set the default query timeout for all statements. |
void |
setServerName(java.lang.String serverName)
Set the server name of the MS SQL Server. |
void |
setSqlServer7Mode(boolean mode)
Deprecated. See setMode |
void |
setUseCursorsAlways(boolean mode)
Set the flag useCursorsAlways of the driver. |
void |
setUser(java.lang.String user)
Set the user account for the connection. |
java.lang.String |
toString()
|
| Methods inherited from class com.inet.tds.TdsDriver |
acceptsURL, connect, getMajorVersion, getMinorVersion, getPropertyInfo, jdbcCompliant, run |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int MODE_SQLSERVER_65
public static final int MODE_SQLSERVER_70
public static final int MODE_SQLSERVER_70_ASCII
| Constructor Detail |
public TdsDataSource()
public TdsDataSource(java.util.Properties info)
throws java.sql.SQLException
info - a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included| Method Detail |
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLException -
public java.sql.Connection getConnection(java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourceusername - the database user on whose behalf the Connection is being made.password - the user's password.java.sql.SQLException - public java.lang.String getServerName()
public void setServerName(java.lang.String serverName)
serverName - the host name or IP-Address.public java.lang.String getInstanceName()
public void setInstanceName(java.lang.String serverName)
instance - name.public java.lang.String getDatabaseName()
public void setDatabaseName(java.lang.String databaseName)
databaseName - the name of database.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description - a one line description.public int getPortNumber()
public java.lang.String getPort()
public void setPortNumber(int portNumber)
portNumber - the port number.public void setPort(java.lang.String port)
port - the port number.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password - the password for the MS SQL Server.public java.lang.String getUser()
public void setUser(java.lang.String user)
user - the user for the MS SQL Server.public java.lang.String getCharset()
public void setCharset(java.lang.String charset)
charset - the charset for the MS SQL Server.public java.io.PrintWriter getLogWriter()
getLogWriter in interface javax.sql.DataSourcepublic void setLogWriter(java.io.PrintWriter out)
setLogWriter in interface javax.sql.DataSourcepublic int getLoginTimeout()
getLoginTimeout in interface javax.sql.DataSourcepublic void setLoginTimeout(int seconds)
setLoginTimeout in interface javax.sql.DataSourceseconds - the login timeout for the connection.public int getQueryTimeout()
public void setQueryTimeout(int seconds)
seconds - the query timeout
public void setProperty(java.lang.String name,
java.lang.String value)
name - The name of the property.value - The value of the property.getProperty(String),
getProperties()
public void setProperty(java.lang.String name,
java.lang.Object value)
name - The name of the property.value - The value of the property.getProperty(String),
getProperties()public java.lang.String getProperty(java.lang.String name)
name - The name of the property.setProperty(String,String),
getProperties()public void setProperties(java.util.Properties properties)
name - The name of the property.value - The value of the property.getProperty(String),
getProperties()public java.util.Properties getProperties()
name - The name of the property.setProperty(String,String),
getProperty(String)public void setMode(int mode)
mode - the protocol modegetMode(),
MODE_SQLSERVER_65,
MODE_SQLSERVER_70,
MODE_SQLSERVER_70_ASCIIpublic int getMode()
setMode(int),
MODE_SQLSERVER_65,
MODE_SQLSERVER_70,
MODE_SQLSERVER_70_ASCIIpublic void setSqlServer7Mode(boolean mode)
mode - the protocol modegetSqlServer7Mode(),
setMode(int)public boolean getSqlServer7Mode()
setSqlServer7Mode(boolean)public void setUseCursorsAlways(boolean mode)
getUseCursorsAlways()public boolean getUseCursorsAlways()
setUseCursorsAlways(boolean)
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException - public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare.
public javax.naming.Reference getReference()
throws javax.naming.NamingException
getReference in interface javax.naming.Referenceablepublic java.lang.String toString()
toString in class java.lang.Object
|
|
|||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||