How to set an ESQL value into a variable?

2003-02-26 Thread Maxime.Gheysen
Hi,
I make a connection (using ESQL) and get a value esql:get-string
column=MYVAR/ .

How can I get this value on the page to build another query like :

Select * From mytable where ID = MYVAR

I tried with xsp:parameter name=MYVAResql:get-string
column=MYVAR//xsp:parameter
But when I request it I get the error : variable MYVAR not defined. Even
if I add
xsp:logic
Int MYVAR = 0;
/xsp:logic

How can I put my ESQL value into a variable?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to set an ESQL value into a variable?

2003-02-26 Thread Maxime.Gheysen
Hi,
I make a connection (using ESQL) and get a value esql:get-string
column=MYVAR/ .

How can I get this value on the page to build another query like :

Select * From mytable where ID = MYVAR

I tried with xsp:attribute name=MYVAResql:get-string
column=MYVAR//xsp:attribute But when I request it I get the error :
variable MYVAR not defined. Even if I add xsp:logic Int MYVAR = 0;
/xsp:logic

How can I put my ESQL value into a variable?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to set an ESQL value into a variable?

2003-02-26 Thread Richard In Public
Hi Maxime

Assuming that the second query is in the same XSP document as the first, you
can do this
by nesting the queries as sketched below.  The essential things to note:

1.  The nested-query is a regular esql:execute-query element, placed
within the an esql:row-results element.  It's syntax is identical to a
normal query.  (You may be able to place the nested query within other
elements - this is the only one that I have needed to use.)
2.  You can refer to any of the selected columns in a parent query by adding
an ancestor attribute to the esql:get-xxx tag:  e.g. esql:get-string
column=id ancestor=1 /

Hope this helps,

Richard

//...
esql:connection
esql:poolMyPool/esql:pool
esql:execute-queryselect id from MyOtherTable
where.../esql:execute-query
esql:results
esql:row-results

esql:execute-queryselect * from MyTable where
ID='esql:get-string column=id ancestor=1 /'/esql:execute-query
esql:results
//...
/esql:results

esql:row-results
/esql:results

/esql:connection
...//...
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 9:10 AM
Subject: How to set an ESQL value into a variable?


Hi,
I make a connection (using ESQL) and get a value esql:get-string
column=MYVAR/ .

How can I get this value on the page to build another query like :

Select * From mytable where ID = MYVAR

I tried with xsp:attribute name=MYVAResql:get-string
column=MYVAR//xsp:attribute But when I request it I get the error :
variable MYVAR not defined. Even if I add xsp:logic Int MYVAR = 0;
/xsp:logic

How can I put my ESQL value into a variable?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to set an ESQL value into a variable?

2003-02-26 Thread Christian Haul
On 26.Feb.2003 -- 10:10 AM, [EMAIL PROTECTED] wrote:
 Hi,
 I make a connection (using ESQL) and get a value esql:get-string
 column=MYVAR/ .
 
 How can I get this value on the page to build another query like :
 
 Select * From mytable where ID = MYVAR
 
 I tried with xsp:attribute name=MYVAResql:get-string
 column=MYVAR//xsp:attribute But when I request it I get the error :
 variable MYVAR not defined. Even if I add xsp:logic Int MYVAR = 0;
 /xsp:logic
 
 How can I put my ESQL value into a variable?

xsp:logic
String myVar = esql:get-string column=MYVAR/;
/xsp:logic

Similar for other types.

Chris.

Please follow up summarizing your problem and which suggested solution
/ information worked for you when you consider your problem
solved. Add SUMMARY:  to the subject line. This will make FAQ
generation and searching the list easier. In addition, it makes
helping you more fun. Thank you.

And if you are really cool, add a page at http://wiki.cocoondev.org

-- 
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]