Web Design and Development Forums

JSP codes seems not executed correctly

This is a discussion on "JSP codes seems not executed correctly" within the File Based Storage and Others section. This forum, and the thread "JSP codes seems not executed correctly are both part of the Databases category.


Go Back   Webforumz.com > Databases > File Based Storage and Others

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Aug 29th, 2005, 03:27   #1 (permalink)
New Member
 
Join Date: Aug 2005
Posts: 6
JSP codes seems not executed correctly

Hi,

I would like to check with you how JSP codes residing in js function works.

How can I get the 2nd select stmt executed based on the values retrieve from 1st select statement and the conditions pass in to this js function

How can I get the select statement to execute only when a condition is met.

The following is the codes. It is not executing the 2nd select statement. when I didnt put in the 2nd select stmt, i manage to execute codes in that portion

script
====
function test(obj, obj2) {
<%
sql_query = "SELECT a1, a2 , a3, a4, a5 "+
" FROM table_a ";
try {
rset = db.execSQL(sql_query);
}
catch(SQLException e){
System.err.println ("Error in query " +e);
}
%>

var po_ln_fnd = false

<% while (rset.next()) {
j_a1 = rset.getString("a1");
j_a2 = rset.getString("a2");
j_a3 = rset.getString("a3");

%>

if ((eval(obj2.value)== '<%=j_a1%>')) {
if ((obj.value == '<%=j_a2%>') ) {
<% j_a4 = rset.getString("a4");
j_a5 = rset.getString("a5");

sql_query = "SELECT b2, b3, b4 "+
" FROM table_b "+
" WHERE b1 = '"+j_a3+"' ";
try {
rset = db.execSQL(sql_query);
}
catch (SQLException e) {
System.err.println("Error in query " +e);
}
while (rset.next()) {
j_b2 = rset.getString("j_b2");
j_b3 = rset.getString("j_b3");
j_b4 = rset.getString("j_b4");
}
%>
}
}
<%}>
}
tllcll is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
jsp, codes, seems, executed, correctly

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
want to develop a form by css codes nisha_npt CSS Forum 1 Mar 1st, 2008 12:52
web site hosting coupons and codes richard12 Hosting & Domains 4 Mar 6th, 2007 02:07
MS Specific Error Codes spinal007 JavaScript Forum 0 Jan 16th, 2007 12:00
dir codes ST PHP Forum 1 Jan 11th, 2006 00:08



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 05:04.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59