Caros,

Baixei um driver JDBC para MsSQL e etou com problemas para  a 
instalacao. O erro "classe nao econtrada" acontece no forname() que esta 
sendo executado da maneira listada no arquivo anexo (enviado junto do 
driver).
O driver eh composto por arquivos .class (nao deveriam ser .jar??) com a 
instrucao para serem "copiados para o classpath". Como estou usando o 
javawebserver 1.1, alterei a chamada do aplicativo para que se possa 
contemplar os arquivos listados, mas o erro persistiu.

Alguem tem alguma ideia???

Desde jah agradeco,

Heider
Get Your Private, Free Email at http://www.hotmail.com
MS SQL JDBC Driver Version 1.14
Last Modified:  1-Mar-1999


Table Of Contents
-----------------
        1    Changes To Previous Versions
        1.1  Changes To Version 1.00
        1.2  Changes To Version 1.01
        1.3  Changes To Version 1.02
        1.4  Changes To Version 1.03
        1.5  Changes To Version 1.04
        1.6  Changes To Version 1.05
        1.7  Changes To Version 1.06
        1.8  Changes To Version 1.07
        1.9  Changes To Version 1.08
        1.10 Changes To Version 1.09
        1.11 Changes To Version 1.10
        1.12 Changes To Version 1.11
        1.13 Changes To Version 1.12
        2    Installation
        3    Getting Started
        3.1  SQL Server, Java and JDBC Versions
        3.2  Check Host Name And Port Number Of Your Server
        3.3  Driver Name
        3.4  URL Syntax
        3.5  Implemented Properties
        3.6  Connection Example
        4.   Escape Clauses
        4.1  Date and Time
        4.2  Stored Procedures
        4.3  Functions
        5.   Character Converting 
        6.   Known Limitation 
        7.   Copyright and Support



1   Changes To Previous Versions
--------------------------------

1.1 Changes To Version 1.00
--------------------------
        - the url of the driver was changed to jdbc:inetdae:hostname:portnumber
        - a bug with the execution of stored procedures was fixed



1.2 Changes To Version 1.01
---------------------------
        - In the resultset many functions had thrown a NullPointerException
          if the value was SQL NULL. Now the result is:
                getBoolean      false
                getByte         0
                getShort        0
                getInt          0
                getLong         0
                getFloat        0
                getDouble       0
        - The error "[TDS driver]Error in the TDS datastream: unknown block: -91"
          and "[TDS driver]Error in the TDS datastream: unknown block: -92" are 
          corrected.


                
1.3 Changes To Version 1.02
---------------------------
        - A problem with columns without null was fixed.
        - The URL was expanded with optional properties (database, language, 
          charset, user and password)
        - A bug in getDate() and getTime() 
          (java.lang.ClassCastException: java.sql.Timestamp) was fixed.
        - ODBC SQL escape sequence was implemented:
                * {d 'yyyy-mm-dd'}
                * {t 'hh:mm:ss[.fff]'}
                * {ts 'yyyy-mm-dd hh:mm:ss[.fff]'}
                * {call storedProcedures('Param1'[,'Param2'][...])}



1.4 Changes To Version 1.03
---------------------------
        - Many functions in DatabaseMetaData were implemented.
        - CallableStatement and PreparedStatement was implemented.



1.5 Changes To Version 1.04
---------------------------
        - Property "debug" was implemented.
        - Default charset was changed to 
          sun.io.ByteToCharConverter.getDefault().getCharacterEncoding()
        - A bug with ResultSet.getBoolean() was fixed.
        - A bug with datatype numeric and decimal was fixed.
        - Function getPropertyInfo was implemented.



1.6 Changes To Version 1.05
---------------------------
        - Large querys are faster.
        - PreparedStatement.setObject() now implements java.sql.Timestamp,
          java.sql.Date and java.sql.Time
        - A bug with using apostrophes in PreparedStatement.setString and
          PreparedStatement.setObject was fixed.
        - Property "nowarnings" was implemented.



1.7 Changes To Version 1.06
---------------------------
        - A Bug with sign from numeric data was fixed.
        - A Bug in PreparedStatement.setDate(), PreparedStatement.setTime()
          and PreparedStatement.setTimestamp() was fixed.



1.8 Changes To Version 1.07
---------------------------
        - Private JDBC 2.0 methods removed from the class files. Now you can use
          the driver with JRE 1.2. But you can only use the methods from
          JDBC 1.22 (JRE 1.1).



1.9 Changes To Version 1.08
---------------------------
        - A Bug with getBytes() on binary values was fixed.




1.10 Changes To Version 1.09
----------------------------
        - A Bug with truncated textfield at 4096 bytes was fixed.
        - PreparedStatement.setObject() now implements java.lang.Long and 
java.lang.Boolean.
        - A encoding problem with getBinaryStream() was fixed.
        - A bug with using apostrophes in PreparedStatement.setString and
          PreparedStatement.setObject(int parameterIndex, Object x, int targetSqlType, 
int scale) 
          was fixed. This method is using from the JBuilder.
        - A problem with setTimestamp and the TimeZone in 
          JDK 1.1.6 or higher was fixed.




1.11 Changes To Version 1.10
----------------------------
        - The function setBinaryStream was implemented.
        - A problem with transaction was fixed.
        - Escape functions was implemented.
        - The result object from the method getObject() of bit columns is now Boolean.
        - Escape Function was implemented.
        - Character converting was implemented.





1.12 Changes To Version 1.11
----------------------------
        - The url option "debug=true" was removed. You can use
          DriverManager.setLogStream(System.out);
        - A bug with large values in numeric columns was fixed (invalid values).
        - The new bug with getDouble (only release 1.11) was fixed.
        - Convert problem with setBinaryStream and setAsciiStream was fixed.




1.13 Changes To Version 1.12
----------------------------
        - The method setAsciiStream support very large streams now.
        - A bug with Nummeric columns was fixed.





1.14 Changes To Version 1.13
----------------------------
        - The method getBigDecimal support float sql columns now.
        - Deal Locks with complex transactions was fixed.
        - The date/time methods use now the default timezone.





2 Installation
----------------
        - copy the class files in your classpath
List of the files:
        - com.inet.tds.TdsDriver
        - com.inet.tds.TdsConnection
        - com.inet.tds.TdsResultSet
        - com.inet.tds.TdsStatement
        - com.inet.tds.TdsResultSetMetaData
        - com.inet.tds.TdsDatabaseMetaData
        - com.inet.tds.SqlFunctions             only for use with Escape Functions




3   Getting Started
--------------------

3.1 SQL Server, Java and JDBC Versions
--------------------------------------
        Java Versions: 1.1x
        JDBC Version:  1.22
        SQL Server Version:
        - Microsoft SQL Server 7.0
        - Microsoft SQL Server 6.5



3.2 Check Host Name And Port Number Of Your Server
--------------------------------------------------
This driver works with Microsoft SQL Servers that are configured to use
the TCP/IP networking protocol. Please verify that your server is
currently listening to a TCP/IP port. 

If you know  that your SQL Server is listening on a TCP/IP port and you
know the host name of your SQL Server and the port number you can go to
the next chapter.

To check or enable the TCP/IP Sockets protocol follow these steps:
For Microsoft SQL Server 6.5: 
Click -SQL Setup- in the MS SQL Server program group.
If not selected select -Change Network Support-, select -TCP/IP- and enter 
the port number you want to use (default port: 1433).
If -Change Network Support- is selected, than cancel the setup.
  
For Microsoft SQL Server 7.0: 
Click -SQL Server Network Utility- in the Microsoft SQL Server 7.0 program group. 
On the general property sheet, click -Add- and select -TCP/IP- under Network libraries.
Enter the port number and the proxy address (if nesessary) and click OK.
 
The default port number for the Microsoft SQL Server is usually 1433.
However, servers can be configured to listen on any port number.
  
To make sure that the RDBMS server is listening on the machine name and
port number you specified use: 
  
telnet <hostname or ip address> <port number> 

If the connection is refused, then the hostname or the port number are
incorrect. 



3.3 Driver Name
---------------
The class name of the driver is
        com.inet.tds.TdsDriver



3.4 Url Syntax
--------------
        jdbc:inetdae:hostname:portnumber
        jdbc:inetdae:hostname                   -> with default port 1433
        jdbc:inetdae:hostname:portnumber?database=MyDb&language=deutsch
                                                -> with properties

e.g.    jdbc:inetdae:www.inetsoftware.de:1433
        jdbc:inetdae:localHost:1433


3.5 Implemented Properties
--------------------------
        - database      -> default is "master"
        - language      -> default is "us_english"
                        -> "" -> SQL Server default language
        - user
        - password
        - charset       -> see Character Converting
        - nowarnings    -> "true" getWarnings() returns null

There are two ways to put the properties to the driver:
        1. append the properties to the URL like this
                jdbc:inetdae:hostname:portnumber?database=MyDb&language=deutsch

        2. call from method getConnection(String url, Properties info) from
           the driver manager.



3.6 Connection Example
----------------------
import java.sql.*;                  // JDBC package

String url = "jdbc:inetdae:localhost:1433";     // use your hostname and port number 
here
String login = "sa";                                    // use your login here
String password = "";                           // use your password here

        try{
                //DriverManager.setLogStream(System.out); // to create more info 
                                                          // for technical support
                        
                //load the class with the driver
                Class.forName("com.inet.tds.TdsDriver");                // JDK,Netscape
                //or
                Class.forName("com.inet.tds.TdsDriver").newInstance();  // 
JDK,Netscape,IE
                //or
                new com.inet.tds.TdsDriver();                   // JDK,Netscape,IE

                
                //set a timeout for login and query
                DriverManager.setLoginTimeout(10);


                //open a connection to the database
                Connection connection = 
DriverManager.getConnection(url,login,password);

                //select a database
                connection.setCatalog( "MyDatabase");

                //create a statement
                Statement st = connection.createStatement();

                //execute a query
                ResultSet rs = st.executeQuery("SELECT * FROM tblExample");

                //close the objects
                st.close();
                connection.close();

        }catch(Exception e){
                e.printStackTrace();
        }





4.   Escape Clauses
-------------------
The driver implements follow escape clauses:

4.1  Date and Time
------------------
        {d 'yyyy-mm-dd'}
        {t 'hh:mm:ss[.fff]'}
        {ts 'yyyy-mm-dd hh:mm:ss[.fff]'}

4.2  Stored Procedures
----------------------
        {call storedProcedures('Param1'[,'Param2'][,?][...])}
        {? = call storedProcedures('Param1'[,'Param2'][,?][...])}

4.3  Functions
--------------
        {fn now()}
        {fn curdate()}
        {fn curtime()}





5.   Character Converting 
-------------------------
By default character converting is disabled. To use character converting in the driver 
you need to append "charset=YourCharSet" to the url.

for example: "jdbc:inetdae:localhost:1433?charset=Cp1250"
or           "jdbc:inetdae:localhost:1433?charset=" + 
sun.io.ByteToCharConverter.getDefault().getCharacterEncoding();

Tip: the property charset is case-sensitive in java





6.   Known Limitation
---------------------
The driver does not support the new datatypes in MS SQL 7.0, i.e. nchar, ntext, 
nvarchar.


 


7.   Copyright and Support
--------------------------
        Copyright by i-net software
        More info and updates you can find at
        http:\\www.inetsoftware.de
        news:\\news.inetsoftware.de




� 1998 i-net software


Responder a