Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 54166 invoked from network); 14 Mar 2008 12:36:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2008 12:36:29 -0000 Received: (qmail 86083 invoked by uid 500); 14 Mar 2008 12:36:23 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 86054 invoked by uid 500); 14 Mar 2008 12:36:23 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 86043 invoked by uid 99); 14 Mar 2008 12:36:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Mar 2008 05:36:23 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.136.44.40] (HELO n60.bullet.mail.sp1.yahoo.com) (98.136.44.40) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 14 Mar 2008 12:35:32 +0000 Received: from [216.252.122.218] by n60.bullet.mail.sp1.yahoo.com with NNFMP; 14 Mar 2008 12:35:52 -0000 Received: from [69.147.65.171] by t3.bullet.sp1.yahoo.com with NNFMP; 14 Mar 2008 12:35:52 -0000 Received: from [127.0.0.1] by omp506.mail.sp1.yahoo.com with NNFMP; 14 Mar 2008 12:35:52 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 484478.8880.bm@omp506.mail.sp1.yahoo.com Received: (qmail 98724 invoked by uid 60001); 14 Mar 2008 12:35:52 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=uFbA+UhzgvvboPQ6jYEXkq6cN3S78H8vOWf+mcjjpxID+O7J6GGPNqB+XM3r2bRyTz+iznp1uN23IPgrlAYOEqsXzV9i0lArrFojkJHOflXMFpYHMppEiDG8oXzEe4meq43yylPlXtan24siWS1WVd6QxTuPL+vgTSghf5LmKgQ=; Received: from [220.225.96.24] by web46012.mail.sp1.yahoo.com via HTTP; Fri, 14 Mar 2008 05:35:51 PDT X-Mailer: YahooMailRC/902.38 YahooMailWebService/0.7.162 Date: Fri, 14 Mar 2008 05:35:51 -0700 (PDT) From: Bently Drake Subject: Re: ant sql call stored procedure To: Ant Users List MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-2001575845-1205498151=:93059" Message-ID: <279875.93059.qm@web46012.mail.sp1.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --0-2001575845-1205498151=:93059 Content-Type: text/plain; charset=us-ascii Can you please attach sql file with the mail ----- Original Message ---- From: Steve Loughran To: Ant Users List Sent: Friday, March 14, 2008 3:47:20 PM Subject: Re: ant sql call stored procedure Chaohua Wang wrote: > Hi folks, > > > I am using ant sql to call a stored procedure of Ms Sql server > > driver="${jdbcdriver}" > url="${dburl}/BillPay" > userid="${userid}" > password="${password}" > src=" uspSelectCount.sql " > classpathref="webtest.path.id" > > > > I can execute stored procedure in Ms Sql server. My stored procedure name is uspSelectCount. But when I am using ant sql to call the file uspSelectCount.sql that is located with the build file. > > I always got this exception: > > test: > [sql] Executing file: C:\workspace\Canoo\billPay\tests\uspSelectCount.sql > [sql] Failed to execute: ?U S E [ B i l l P a y ] G O / * * * * * * O b j e c t : S t o r e d P r o c e d u r e [ d b o ] . [ u s p S e l e c t C o u n t ] S c r i p t D > a t e : 0 3 / 1 3 / 2 0 0 8 1 5 : 5 1 : 1 3 * * * * * * > [sql] java.sql.SQLException: Incorrect syntax near 'E'. > [sql] Failed to execute: S E T A N S I _ N U L L S O N G O S E T Q U O T E D _ I D E N T I F I E R O N G O - - = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = > = = = = = = = = = = = - - A u t h o r : < A u t h o r , , N a m e > - - C r e a t e d a t e : < C r e a t e D a t e , , > - - D e s c r i p t i o n : < D e s c r i p > t i o n , , > - - = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = C R E A T E P R O C E D U R E [ d b o ] . [ u s p S e l e c t C o u n t ] A S B > E G I N - - S E T N O C O U N T O N a d d e d t o p r e v e n t e x t r a r e s u l t s e t s f r o m - - i n t e r f e r i n g w i t h S E L E C T s t a t e m e n t s . > S E T N O C O U N T O N ; S e l e c t c o u n t ( * ) f r o m d b o . P a y m e n t s _ S t a g i n g E n d > [sql] java.sql.SQLException: Incorrect syntax near 'T'. > > > 'E' is the third character of USE. 'T' is the third character of SET. I am not sure the reason why? Please help. I dont like the look of all the spaces in the message ... it hints that the SQL task isnt loading in the text in the right encoding, which is bound to cause trouble. Try playing with the encoding attribute of the task to get it and the text consistent. -- Steve Loughran http://www.1060.org/blogxter/publish/5 Author: Ant in Action http://antbook.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs --0-2001575845-1205498151=:93059--