• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ant Build - How i print with a variable in echo tag using sql transaction?

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all, I have this xml to use with ant build and i want to obtain one variable that I will explain later:


This is my question:
How i can obtain the result of my query and put it in variable, that it is located in transaction tag and use echo tag to show the result?
I need it to show in the future the result obtained through this variable.

e.g (I think that it is similar):

Regards.
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mikel,
Welcome to CodeRanch!

The <sql> task has an "output" attribute that lets you specify where the output should go. You can have it go to a file of any name.

Then you can use <loadFile> to read the file into a property.
 
Mikel Mato
Greenhorn
Posts: 6
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:Mikel,
Welcome to CodeRanch!

The <sql> task has an "output" attribute that lets you specify where the output should go. You can have it go to a file of any name.

Then you can use <loadFile> to read the file into a property.



Thanks Jeanne for reply my question.

It works and is very useful.

Regards.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic