ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heath, Douglas T" <douglas.t.he...@ttu.edu>
Subject RE: Long/int not working
Date Mon, 14 Feb 2005 15:04:36 GMT
I've found a solution. I don't know if this is a setting in our SQL
server or not, but the datetime records time to the millisecond, but
when I query the table and grab the datetime in the object associated
with a row, it only goes to the second. Consequently, doing a query
where SQLcolumn=x doesn't work, because the dates aren't equal. I fixed
it by converting the datetime from the table in the query to a string
that only goes to the last second. 
 
We had to get the latest version from svn to get the query to even work
for the isNotEqual in dynamic queries. I didn't check the bug list or
bug fixes, but I think that was our first problem. 
 
I think this is most likely a problem with SQL administration, if you
can change how accurate datetimes are supposed to be. If not, then ms
sql server just sucks :)
 
Thanks for your help!
Terry

________________________________

From: roberto [mailto:roberto@theaegis.org] 
Sent: Friday, February 11, 2005 11:51 PM
To: ibatis-user-cs@incubator.apache.org
Subject: RE: Long/int not working



Terry, I've tried a dynamic select statement like yours with a bool used
for the comparison and another property used for the actual SQL and it
worked.  Are you able to debug and step through what may be happening to
the query / command text?

 

Roberto

 

 

-----Original Message-----
From: Heath, Douglas T [mailto:douglas.t.heath@ttu.edu] 
Sent: Friday, February 11, 2005 4:54 PM
To: ibatis-user-cs@incubator.apache.org
Subject: RE: Long/int not working

 

I fixed the int and long problem, but I still can't get timestamp to
search correctly. I fixed the first two by going to the most recent
version of ibatis in svn. 

 

I added parameterClass="PAF_ACTION_CT_MAIN", and that didn't work. 

 

I tried the literal syntax on the timestamp, but haven't gotten it to
work. I've even added a property called SQLTimestamp to return a
definitely-formatted-correctly SQL datetime, but I can't make it work. 

 

Any ideas?

 

Thanks!

Terry

 

________________________________

From: roberto [mailto:roberto@theaegis.org] 
Sent: Friday, February 11, 2005 3:00 PM
To: ibatis-user-cs@incubator.apache.org
Subject: RE: Long/int not working

Terry, 

 

The .vb files got deleted, but the SqlMap xml file got through.

 

Anyway, just for clarification, using
parameterClass="PAF_ACTION_CT_MAIN" doesn't work?

 

Also, what database and provider are you using?

 

Can you try the literal syntax ($ActionCTId$ instead of #ActionCTId#)?

 

Roberto

 

 

-----Original Message-----
From: Heath, Douglas T [mailto:douglas.t.heath@ttu.edu] 
Sent: Friday, February 11, 2005 1:12 PM
To: ibatis-user-cs@incubator.apache.org
Subject: RE: Long/int not working

 

Ok, I set that, but still no luck. One thing that I don't know if I
pointed out is that it _does_ work for string elements, but not int/long
or datetime. I've attached the xml and related classes.

 

The only thing that doesn't work is the search. 

 

Thanks in advance!

Terry

 

________________________________

From: roberto [mailto:roberto@theaegis.org] 
Sent: Thursday, February 10, 2005 12:26 PM
To: ibatis-user-cs@incubator.apache.org
Subject: RE: Long/int not working

Doh!  Sorry, I meant:

 

<select id="PAF_ACTION_CT_MAINSearch"
resultMap="PAF_ACTION_CT_MAINResult"
parameterClass="yourClassNameTypeAlias_Or_FullNamespaceAndAssembly"> 

 

...needs to be added as an attribute of your select element.

 

Roberto

 

 


Mime
View raw message