Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shilpa.joshiv
Starting Member
3 Posts |
Posted - 2009-12-04 : 04:45:19
|
| i m writing the following query as an jsp code..<% String Query="select * from product_details where zone_name='jsp_var1' ";%> the value of jsp_var1 is already defined and it is of type String onlybut this query is not taking the value of jsp_var1...what to do????????plzzzzzzz help |
|
|
kbhere
Yak Posting Veteran
58 Posts |
Posted - 2009-12-04 : 04:59:45
|
| <%String Query="select * from product_details where zone_name = '" +jsp_var1+ "' ";%>Try this and reply with your comments..Balaji.K |
 |
|
|
shilpa.joshiv
Starting Member
3 Posts |
Posted - 2009-12-04 : 06:22:19
|
| absolutely rite..........itz workingthanx a lot.... |
 |
|
|
kbhere
Yak Posting Veteran
58 Posts |
Posted - 2009-12-04 : 06:32:35
|
quote: Originally posted by shilpa.joshiv absolutely rite..........itz workingthanx a lot....
Ok.. You are always welcome..Balaji.K |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-04 : 07:27:00
|
quote: Originally posted by shilpa.joshiv i m writing the following query as an jsp code..<% String Query="select * from product_details where zone_name='jsp_var1' ";%> the value of jsp_var1 is already defined and it is of type String onlybut this query is not taking the value of jsp_var1...what to do????????plzzzzzzz help
Because it is treated a value as your query becomesselect * from product_details where zone_name='jsp_var1' It is better you use parameter instead of concatenating the valueMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|