Download the MS JDBC driver, and never use ODBJ-JDBC bridge.

-----Original Message-----
From: Cui Xiaojing-a13339 [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 19, 2003 8:36 AM
To: Tomcat Users List
Subject: A weird issue


Hello All,

Now my software platform as below:

Windows 2000
JDK1.4.1_02
Tomcat 4.1.24
Sql Server 2000

I have a piece of code as below:

        private String jdbcDriverClass="sun.jdbc.odbc.JdbcOdbcDriver";
        private String jdbcURL="jdbc:odbc:cfdata";
        private String jdbcUserName="sss";
        private String jdbcPassword="sss";
        try {
                Class.forName(jdbcDriverClass);
                con=DriverManager.getConnection(jdbcURL, jdbcUserName,
jdbcPassword);
                stmt=con.createStatement();
        } catch (SQLException se) {
                throw new RuntimeException("A database error occured. "
+ se.getMessage());
        
        try{
                String sqls="select CID from CF_GDW_Load";
                rs=stmt.executeQuery(sqls);
        }

This piece of code is run in tomcat. It will extract data from table in
Sql Server 2000. In Sql Server 2000, the table is named as CF_GDW_LOAD,
but in the code I write it as CF_GDW_Load. I know that itis not case
sensitive in Sql Server, but when I run this piece code in Tomcat, an
exception occurs. it says that [Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 'CF_GDW_Load'. If I change CF_GDW_Load to
CF_GDW_LOAD in the code, no exception occurs. So in here it is case
sensitive. But making me surprised is that on the same software
platform, I run another piece of code in Tomcat, it extract data from a
table in another database in Sql Server 2000, it is not case sensitive.
Do you have any idea about the weird issue? Thanks.

Regards,
Xiaojing


---------------------------------------------------------------------
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]

Reply via email to