emacarron / mybatis

Automatically exported from code.google.com/p/mybatis
0 stars 0 forks source link

Problem with select ( Access 2007 DB) #115

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Hi
I have a problem with Ibatis 3.0. in Select Query.
I am using access database. Insert,  delete, update query is working fine but 
select is not working.
I want to populate an ArrayList, with the rows returned from the Database. The 
query xml file is: - 

The resultMap :

<resultMap type="logic.SeatPool" id="result" >
<result column="SEAT_NUMBER" property="seatNumber" />     
<result column="AVAILABLE_SEAT" property="available" /> 
</resultMap>

Select Query:

<select id="selectAll" resultMap="result">
          select SEAT_NUMBER, AVAILABLE_SEAT  from SEAT_POOL
</select>

Method calling:
ArrayList<SeatPool> freeList = null;
freeList = (ArrayList<SeatPool>) session.selectList(SeatPool.class.getName()+ 
".selectAll");

SeatPool( in logic package ) is a bean which has got 2 properties – 
seatNumber and available and the table contains 2 columns SEAT_NUMBER and 
AVAILABLE_SEAT

The problem is that it is throwing exception: SQLException: Data not found.
The connection is working fine as I am using the same xml file for the 
insertion and other updation operations.
Please help me on this. 

Original issue reported on code.google.com by mahakars...@gmail.com on 22 Sep 2010 at 1:31

Attachments:

GoogleCodeExporter commented 9 years ago
Hi  mahakarsha.bhattacharya,
if you didn't get a quick reply is because for this kind of questions it is 
much better using the proper user mailing list, you can subscribe on 
http://groups.google.com/group/mybatis-user
You're strongly encouraged to join it, is the right place where requesting the 
support, this place is only to collect defects

Original comment by simone.t...@gmail.com on 1 Nov 2010 at 1:33