tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cui Xiaojing-a13339 <a13...@motorola.com>
Subject A weird issue
Date Fri, 19 Dec 2003 15:36:00 GMT
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message