ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 1727] New - SQLExec fails on inserting using JSQLConnect driver
Date Fri, 11 May 2001 18:55:43 GMT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1727

*** shadow/1727	Fri May 11 11:55:42 2001
--- shadow/1727.tmp.27885	Fri May 11 11:55:42 2001
***************
*** 0 ****
--- 1,59 ----
+ +============================================================================+
+ | SQLExec fails on inserting using JSQLConnect driver                        |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 1727                        Product: Ant                     |
+ |       Status: NEW                         Version: 1.3                     |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Normal                   OS/Version: Windows NT/2K           |
+ |     Priority:                           Component: Core tasks              |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: ant-dev@jakarta.apache.org                                   |
+ |  Reported By: Gael_Marziou@hp.com                                          |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ Hi,
+ 
+ When doing a simple INSERT using JSQLConnect driver above MSSQL 7, an exception 
+ is thrown:
+ 
+ JSQLConnect is vailable from http://www.j-netdirect.com/
+ 
+ ---------
+ D:\JSQL\testantsql\build.xml:74: com.jnetdirect.jsql.m: Exhausted input. Context
+ :GetNextResults - did not receive expected packet of type:TDS_DONE(-3) TDS_COL_I
+ NFO(-127)
+ --- Nested Exception ---
+ com.jnetdirect.jsql.m: Exhausted input. Context:GetNextResults - did not receive
+  expected packet of type:TDS_DONE(-3) TDS_COL_INFO(-127)
+         at com.jnetdirect.jsql.af.a(Unknown Source)
+         at com.jnetdirect.jsql.w.a(Unknown Source)
+         at com.jnetdirect.jsql.w.getMoreResults(Unknown Source)
+         at org.apache.tools.ant.taskdefs.SQLExec.printResults(SQLExec.java:572)
+         at org.apache.tools.ant.taskdefs.SQLExec.execSQL(SQLExec.java:512)
+ ------
+ 
+ This is because SQLExec tries to browse through resultSet even though execute() 
+ did return false.
+ 
+ So, I made following fix against SQLExec.java 1.17 in execSQL().
+ Sorry, I don't have CVS installed so I just provide a diff output.
+ 
+ diff SQLExec_1.17.java SQLExec.java
+ 527,529c527,530
+ <
+ <             if (print) {
+ <                 printResults(out);
+ ---
+ >             else {
+ >                 if (print) {
+ >                     printResults(out);
+ >                 }
+ 531d531
+ <
+ 
+ Thanks for any feedback,
+ 
+ Gael

Mime
View raw message