No problem in database connection, but problem while retrival - Very Urgent

No problem in database connection, but problem while retrival

Connecting database using MS SQL Server 2000 service pack 3 from java environment

Please help

Error Thrown:

Successfully connected

Driver Information

Driver Name: SQLServer

Driver Version: 2.2.0040

Database Information

Database Name: Microsoft SQL Server

Database Version: Microsoft SQL Server 2000 - 8.00.760 (Intel X86)

Dec 17 2002 14:22:05

Copyright (c) 1988-2003 Microsoft Corporation

Enterprise Edition on Windows NT 5.2 (Build 3790: )

Error occurred when submitting the leave application!

em_code: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLS

erver]LīW 'AMLANEINFO'C

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]L

??W 'AMLANEINFO'C

at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source

)

at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)

at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown

Source)

at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown

Source)

at com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest.processReplyToken(

Unknown Source)

at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Sour

ce)

at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType

(Unknown Source)

at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown

Source)

at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)

at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)

at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown So

urce)

at com.microsoft.jdbc.base.BaseStatement.executeQuery(Unknown Source)

at stratechsytems.hkimmd.apvc.std.common.ConnectionClass.main(Connection

Class.java:75)

Classpath Setting Used for compilation and runtime

set JAVA_HOME=C:\j2sdk1.4.2_01

set Project_HOME=c:\CommonLib

set APPLICATIONS=C:\MQSeries\Source\stratechsytems\hkimmd\apvc\std\others

set CLASSPATH=.;%JAVA_HOME%\lib\tools.jar;%Project_HOME%\lib\com.ibm.mq.jar;%Projec t_HOME%\lib\com.ibm.mqbind.jar;%Project_HOME%\lib\;%Project_HOME%\lib\connector. jar;%Project_HOME%\lib\jta.jar;C:\Program Files\IBM\WebSphere MQ\Tools\Java\base\;%JAVA_HOME%\lib;%Project_HOME%\lib\msbase.jar;%Project_HOME %\lib\mssqlserver.jar;%Project_HOME%\lib\msutil.jar;%APPLICATIONS%;

set path=%path%;C:\j2sdk1.4.2_01\bin;%APPLICATIONS%

@echo.

@echo Your environment has been set

Java Program to test

if (connection != null) {

System.out.println();

System.out.println("Successfully connected");

System.out.println();

// Meta data

DatabaseMetaData meta = connection.getMetaData();

System.out.println("\nDriver Information");

System.out.println("Driver Name: "+ meta.getDriverName());

System.out.println("Driver Version: "+ meta.getDriverVersion());

System.out.println("\nDatabase Information ");

System.out.println("Database Name: "+ meta.getDatabaseProductName());

System.out.println("Database Version: "+meta.getDatabaseProductVersion());

Statement stm = null;

String sql;

try {

stm = connection.createStatement();

sql = "select count(*) from AMMSGTRACK";

ResultSet rsettest = stm.executeQuery(sql);

rsettest.next();

System.out.println("Count : "+ rsettest.getString(1));

} catch (SQLException e) {

System.out.println("Error occurred when submitting the leave application!");

System.out.println("em_code: " + e.toString());

}

[3860 byte] By [mohamed_jaleel] at [2007-11-25 18:19:35]
# 1
Do you have answer for this problem?If you do, please share with me. Thankskejingliu@yahoo.com
welcomeboy1 at 2007-7-3 18:14:38 > top of Java-index,Desktop,Sun Java Desktop System...
# 2
Try one of the Java technology forums. This forum is for Java Desktop System, an alternative to Microsoft Windows.
b.nitz at 2007-7-3 18:14:38 > top of Java-index,Desktop,Sun Java Desktop System...