-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Hi there,
I'm quite new to ESQL and XSP but I have to solve a
specific problem:
I wrote a login.xsp which is simply the formular
for the login
process...this part works fine. After pressing the login-button you are forwarded to login2.xsp. This page should just grant or revoke login and if the login is correct then send some greetings and put out some news information to the user. First part of this still works fine, but if I add
the second part to
the page ( which means I add a second <esql:execute-query>-Tag and so on...) there is no output from the database and secondly if you try to connect via a interactive shell to the db it stucks and you get a timeout. Here are parts of the login2.xsp: (sorry for the bad formatting, but my PGP-signing just change every format you gave your text ;-) ) <body>
<esql:connection> <esql:pool>tb-pool</esql:pool> <esql:execute-query> <esql:query> select * from users where user_name = <esql:parameter><xsp-request:get-parameter name="username"/> </esql:parameter> </esql:query> <esql:results> <esql:row-results> <xsp:logic> if ( <esql:get-string column="user_password"/>.equals(<xsp-request:get-parameter name="passwort"/>) ) { <xsp-session:set-attribute name="userid"><esql:get-string column="user_ID"/></xsp-session:set-attribute> <xsp-session:set-attribute name="userrealname"><esql:get-string column="user_realname"/></xsp-session:set-attribute> <s1 title="User-Bereich"> Hallo, <strong><esql:get-string column="user_realname"/></strong>, wie geht es Ihnen?<br/> <!-- this is the problem part <esql:execute-query> <esql:query> SELECT count(*) FROM mail WHERE user_ID = <esql:parameter><xsp-session:get-attribute name="userid"/> </esql:parameter> </esql:query> <esql:results> <esql:row-results> <nachricht><esql:get-string column="0"/></nachricht> </esql:row-results> </esql:results> <esql:update-results/> <esql:no-results> sorry, der Username ist falsch! </esql:no-results> <esql:error-results/> </esql:execute-query> --> </s1> } else { <para>Sorry, das Passwort ist falsch...<br/> Versuchen Sie es <a href="javascript:history.back();">nochmal</a> </para> } </xsp:logic> </esql:row-results> </esql:results> <esql:update-results/> <esql:no-results> sorry, der Username ist falsch! </esql:no-results> <esql:error-results/> </esql:execute-query> </esql:connection> </body> It seems that nested queries are not allowed. Is
this correct? Has
anybody solved a problem like this? Thanks for helping
Georg
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com> iQA/AwUBPVThmaID3cBIHLXcEQLksQCg1t3gaKrwGxPKyhKrznYmy0PK0jkAn1B8
2ZUmyzNgGXWB7EBPEozKsWUs =LGnf -----END PGP SIGNATURE----- |
- Re: ESQL + XSP: nested queries Georg Spar
- Re: ESQL + XSP: nested queries Sheraz Khan
- Re: ESQL + XSP: nested queries Christian Haul