ibatis servlet query

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

ibatis servlet query

This post has NOT been accepted by the mailing list yet.
I tried querying database records using pass variable from ibatis servlets
it works fine and fetch the records if correct pass value is entered but return error message if wrong pass value is entered

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap
PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"

<sqlMap namespace="Display1">

 <select id="getAll"  parameterClass="long" resultClass="Display1">
   select * from account
WHERE pass ='vatri'


okay now i tried to fetch the record using form inputs from jsp via pass variable in ibatis-servlets, it keeps on returning
error message irrespective of whether correct pass value is entered or not.
when i used input form my query becomes


select * from account
WHERE pass = #pass#

I equally try this query below but it does not work


select * from account
WHERE pass = #pass:Varchar#

I think the problem is from the query. any help please