Define Hashmap

2008-12-01 Thread John Chien
as county, FAC_TYPE as type, FAC_ID_NUMBER as seq_no FROM EH.BETS_FACILITY WHERE COUNTY_ID = #value# Th

Re: queryForList()

2008-10-17 Thread John Chien
objects while I do not have idea of how many objects will be returned. Thanks, John Chien Poitras Christian wrote: It would be better if your code would do one of the following. 1) Use a RowHandler. This is optimized for these kind of queries. 2) Use maxCount in your SQL statement and not

queryForList()

2008-10-17 Thread John Chien
wever, I have it runs in loop and bring back 500 records every time. It should run 21 times. However, it returns null at the 12 loops (very consistently. I try many times) I am wondering what might be the problem. Thanks, John Chien Following is my

Re: SQLException

2008-07-03 Thread John Chien
Thanks. I found that is DatabaseAccessException. Chris O'Connell wrote: Are you using Spring? The Spring SqlMapClientTemplate converts all those SQLExceptions into a runtime exception, so your IDE won't see any exception that you need to 'catch'. -Original Message--

SQLException

2008-07-03 Thread John Chien
According to the IBatis Developer Guide, the insert(), update() ... etc will throw SQLException. However, when I use try and catch block to catch the SQLException, I was told that the exception never throws. What is the real exception throws from those statement ? Thanks, John Chien

Re: queryForList()

2007-12-20 Thread John Chien
Yes. That's the reason I am asking the question. It seems not give me what I expect as mentioned in the question. Larry Meadors wrote: Did you try it? Larry On Dec 20, 2007 1:09 PM, John Chien <[EMAIL PROTECTED]> wrote: Question about : public List queryForList(String st

queryForList()

2007-12-20 Thread John Chien
, (1001 - 1500) The fourth time I call usingqueryForList(statementName, parameterObject, 1500, 500) will give me the next 125 elements, (1501 - 1625) Am I correct about the use of it ? Thanks, John Chien begin:vcard fn:John Chien n:Chien;John email;internet:[EMAIL PROTECTED] tel

Re: PaginatedList

2007-09-04 Thread John Chien
ects. *Throws:* |java.sql.SQLException| - If an error occurs. Cheers, Brandon On 8/31/07, *John Chien* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Dear Sir: I heard that paginated list will be removed from IBatis. Is it true ? If that is true, what is

PaginatedList

2007-08-31 Thread John Chien
Dear Sir: I heard that paginated list will be removed from IBatis. Is it true ? If that is true, what is the replacement ? Thanks, John Chien begin:vcard fn:John Chien n:Chien;John email;internet:[EMAIL PROTECTED] tel;work:919-715-2510 version:2.1 end:vcard

Re: Is there any way to know the exact SQL statement passed from IBATIS to Database

2006-12-13 Thread John Chien
I did not user logging. How do I use logging ? Nathan Maves wrote: Have you looked at enabling logging? If so what are you not seeing? On 12/13/06, *John Chien* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Dear Sir: How can I find the exact SQL statement I

Is there any way to know the exact SQL statement passed from IBATIS to Database

2006-12-13 Thread John Chien
Dear Sir: How can I find the exact SQL statement I passed from IBATIS to database ? Is there anyway to find out ? Thanks, John Chien begin:vcard fn:John Chien n:Chien;John email;internet:[EMAIL PROTECTED] tel;work:919-715-2510 version:2.1 end:vcard

BLOB

2006-10-20 Thread John Chien
* The description file was in PDF format. It was stored into database correctly. It has been verified. However, when I retrieve the data, The descriptionData has always 86 bytes. The data retrieved is not satisfactory. What is the reason ?? Thanks, John C

what does the PaginatedList method means ?

2006-04-12 Thread John Chien
element ? Do I need to call a subList method to return a sublist that I want to display ? Thanks, John Chien begin:vcard fn:John Chien n:Chien;John email;internet:[EMAIL PROTECTED] tel;work:919-715-2510 version:2.1 end:vcard

Re: pager in ibatis

2006-04-12 Thread John Chien
L or TOP in SQL Server) Zarar Siddiqi - Original Message ----- From: "John Chien" <[EMAIL PROTECTED]> To: Sent: Wednesday, April 12, 2006 12:26 PM Subject: Re: pager in ibatis L:arry: Thank you for the information. The queryForPaginatedList() will return a list, then I

Re: pager in ibatis

2006-04-12 Thread John Chien
? Thanks, John Chien Larry Meadors wrote: queryForPaginatedList() Larry On 4/12/06, John Chien <[EMAIL PROTECTED]> wrote: Dear sir: I have a feature that requires me to return query result of a selection statment in certain amount of successive records every time. This is just like

pager in ibatis

2006-04-12 Thread John Chien
30 records every time. For the first call, I want to get the first 30 (1 - 30) records, for thext call, I would like to get the next 30 (31 - 60) records. How can I do this in Ibatis ? Thanks, John Chien begin:vcard fn:John Chien n:Chien;John email;internet:[EMAIL PROTECTED] tel;work:919-715

Re: List of data as input

2006-02-16 Thread John Chien
, I do not quite know how to write the SQL statement. Thanks, John Chien James, Steven wrote: Hi John, If you download the ibatis quick start guide http://cvs.apache.org/dist/ibatis/ibatis.java/docs/iBATIS-SqlMaps-2-Tutorial.pdf you will find this out i no time. Good luck you already

Re: List of data as input

2006-02-16 Thread John Chien
Thanks, [EMAIL PROTECTED] wrote: Hello, You can do this using a dynamic select : title=#titleList[]# Hilde -Original Message- From: John Chien [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 16, 2006 3:38 PM To: user-java@ibatis.apache.org Subject: Re: List of data

Re: List of data as input

2006-02-16 Thread John Chien
Thanks, James, Steven wrote: try this guide http://cvs.apache.org/dist/ibatis/ibatis.java/docs/iBATIS-SqlMaps-2.pdf page 39... The tag will work fine to create and IN list.. steve. From: John Chien [mailto:[EMAIL PROTECTED]] Sent: Thu 16/02/2006 14

List of data as input

2006-02-16 Thread John Chien
list. The number of the element in the array or list may vary. How can I write a SQL to do the job ? SELECT name FROM Employee WHER title = Thanks, John Chien begin:vcard fn:John Chien n:Chien;John email;internet:[EMAIL PROTECTED] tel;work:919-715-2510 version:2.1 end:vcard

Re: the return result of insert, update, and delete in SqlMapClient API

2005-12-15 Thread John Chien
wrote: Hi John Chien,   Sorry but are not to sure about what you mean with the sequence stuff.   I’m using the selectKey tag to return to me the automatic key generated by the database, So for table A with columns id (=auto number), column1, column2 I would just insert

autogenerated key in insertion

2005-12-13 Thread John Chien
? Thanks, John Chien begin:vcard fn:John Chien n:Chien;John email;internet:[EMAIL PROTECTED] tel;work:919-715-2510 version:2.1 end:vcard

Re: the return result of insert, update, and delete in SqlMapClient API

2005-12-13 Thread John Chien
13/05, Leonardo Kenji Shikida <[EMAIL PROTECTED]> wrote: I believe it means the number of affected rows (just like jdbc) On 12/13/05, John Chien <[EMAIL PROTECTED]> wrote: The SqlMapClient API indicates: public int insert(String statementName, Object parame

the return result of insert, update, and delete in SqlMapClient API

2005-12-13 Thread John Chien
or deleted ? Thanks, John Chien begin:vcard fn:John Chien n:Chien;John email;internet:[EMAIL PROTECTED] tel;work:919-715-2510 version:2.1 end:vcard

Insertion into multiple tables in a transaction

2005-12-12 Thread John Chien
is the recommended way to do it in Java/Ibatis ? Thanks, John Chien begin:vcard fn:John Chien n:Chien;John email;internet:[EMAIL PROTECTED] tel;work:919-715-2510 version:2.1 end:vcard

Re: Dynamic statement

2005-11-15 Thread John Chien
Niels: Thank you for the idea. However, it seems not work. Everytime, I tried to run. It just throws exception. John Chien === I use it as: p.PMT_FISCAL_YR = #fields [0].value

Re: Dynamic statement

2005-11-14 Thread John Chien
OR ) which certainly does not make sense. However, I do not know I can get rid of the first OR because any of three fields might have value or no value. Thanks, John Chien Nathan Maves wrote: First off by "not run well"  do you mean that there is an error?  if  so please post it.

Dynamic statement

2005-11-14 Thread John Chien
the where clause syntax is determined by the value in the fields. The statement below does not run well. How can I fix it ? Thanks, John Chien * SELECT -- (Omit

Array as parameter class

2005-10-04 Thread John Chien
Can I write the SqlMap in this way ? or What should I do ? If I just pass in the String[], what can I do ? String[] f; SELECT EHS_ID as id, FROM ehs_table WHERE EHS_ID = #value[0]# ORDER BY id Thanks, John Chien begin:vcard fn:John Chien n:Chien;John email;internet:[EMAIL PROTECTED] tel

Re: N+ 1 selects

2005-09-30 Thread John Chien
selected in the query. Since the EHS_ID is unique (primary key of the table), I would like to get back a HashMap that has all the EHS_ID as its key and all the columns correspond to a specific key to be in a bean. If you can help me in this subject, I will be very appreciate. Thanks, John Chien

Re: N+ 1 selects

2005-09-29 Thread John Chien
Jean: Thank you for your response. That's my fault. My intention actually is not tries to do the N+1 selects, but have returned result putting into a bean. This bean will be used as a property of another bean. I do not know if my way of doing it is correct or not. Somehow it does not work F

N+ 1 selects

2005-09-28 Thread John Chien
EHS_ADDED_DT as added_date, EHS_LAST_UPDATE_DT as last_update_date, EHS_LAST_UPDATE_USER as last_update_user FROM EH.BETS_EHS_INSPECTOR GROUP BY EHS_ID If you can help me, I will be appreciated. Thanks, John Chien begin:vcard fn:John Chien n:Chien;John email;internet:[EMAIL PROTECTED] tel;work:919-715-2510 version:2.1 end:vcard