Here's the code:

Public Class PAF_ACTION_CT_MAIN
        Inherits DBElement ' gives two private fields and properties,
USERID(string) and TIMESTAMP(datetime)

#Region "Private Fields"

        Private _ACTION_CT_ID As Long = -9999
        Private _ACTION_CD As String = ""

#End Region


#Region "Properties"

        Public Property ACTION_CT_ID() As Long
                Get
                        Return Me._ACTION_CT_ID
                End Get
                Set(ByVal Value As Long)
                        Me._ACTION_CT_ID = Value
                End Set
        End Property

        Public Property ACTION_CD() As String
                Get
                        Return Me._ACTION_CD
                End Get
                Set(ByVal Value As String)
                        Me._ACTION_CD = Value
                End Set
        End Property

#End Region


End Class

---------------------------------

Imports IBatisNet.DataAccess

Public Class PAF_ACTION_CT_MAINService
    Inherits Service

        Public Overrides Function search(ByVal element As DBElement) As
IList
                Return Mapper().QueryForList("PAF_ACTION_CT_MAINSearch",
element)
        End Function

End Class 
-------------------------------

Is that what you meant?

Thanks,
Terry

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

parameterClass=?
 
Roberto 

> -----Original Message-----
> From: Heath, Douglas T [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 10, 2005 11:45 AM
> To: ibatis-user-cs@incubator.apache.org
> Subject: Long/int not working
> 
> Hi -
> 
> This is what my xml looks like for this function:
>  <select id="PAF_ACTION_CT_MAINSearch"
> resultMap="PAF_ACTION_CT_MAINResult">
>             select
>                 ACTION_CT_ID,
>                 ACTION_CD,
>                 USERID,
>                 TIMESTAMP
>             from [PAF_ACTION_CT_MAIN]
>             <dynamic prepend="where">
>             <isParameterPresent>
>                 <isNotEqual property="ACTION_CT_ID"
compareValue="-9999"
> prepend="and">
>                     ACTION_CT_ID = #ACTION_CT_ID#
>                 </isNotEqual>
>                 <isNotEmpty property="ACTION_CD" prepend="and">
>                     ACTION_CD = #ACTION_CD#
>                 </isNotEmpty>
>                 <isNotEmpty property="USERID" prepend="and">
>                     USERID = #USERID#
>                 </isNotEmpty>
>                 <isNotEqual property="TIMESTAMP" 
> compareValue="1/1/0001 12:00:00 AM" prepend="and">
>                     TIMESTAMP = #TIMESTAMP#
>                 </isNotEqual>
>             </isParameterPresent>
>             </dynamic>
>         </select>
> 
> For some reason, even if I set ACTION_CT_ID to 1 or 500 or any value, 
> it doesn't append the ACTION_CT_ID=#ACTION_CT_ID# into my query, so it

> ends up just selecting everything from the table. In my code, 
> ACTION_CT_ID is a long.
> 
> Does anyone know what I'm doing wrong?
> 
> Thanks,
> Terry
> 
> -----Original Message-----
> From: Pablo Lopez [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 10, 2005 10:11 AM
> To: ibatis-user-cs@incubator.apache.org
> Subject: Re: selectKey
> 
> Ron Grabowski wrote:
> > Was that included in the latest alpha release? Do I still have to 
> > includ the "as value" clause? Will this work:
> >
> > <selectKey property="PageID" type="post" resultClass="int">  SELECT 
> > @@IDENTITY </selectKey>
> 
> It didn't work for me without the cast (under .NET).
> 
> See you,
> 
> Pablo.
> 
> 




Reply via email to