ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: Trouble with SQL SERVER 2005
Date Thu, 14 May 2009 22:52:31 GMT
Also make sure you're using cursor mode... can't remember the exact
JDBC URL parameter for that one though...

Clinton

On Thu, May 14, 2009 at 2:29 PM, Kai Grabfelder <nospam@kaigrabfelder.de> wrote:
> ups, thats of course the correct answer to your question ;-)
>
> --- Original Nachricht ---
> Absender: Christopher.Mathrusse@sybase.com
> Datum: 14.05.2009 22:14
>> Make the following change below and give it a try.
>>
>>   <resultMap id="RegionResult" class="myapp.models.Region">
>>     <result property="regionId" column="region_id"/>
>>     <result property="regionName" column="region_name"/>
>>   </resultMap>
>>
>>     <select id="selectAllRegion" resultMap="RegionResult">
>>         select region_id,region_name from Region
>>     </select>
>> </sqlMap>
>>
>>
>>
>>
>>
>>
>> Abdel Olakara <olakara@gmail.com>
>> 05/14/2009 12:29 PM
>> Please respond to
>> user-java@ibatis.apache.org
>>
>>
>> To
>> user-java@ibatis.apache.org
>> cc
>>
>> Subject
>> Trouble with SQL SERVER 2005
>>
>>
>>
>>
>>
>>
>>
>> Hi all,
>>
>>  I am using Sql server 2005 with iBATIS in my project. I am using
>> Microsoft provided driver for my connectivity..here is my sqlMapConfig
>> file:
>>
>> <sqlMapConfig>
>>
>>
>>   <transactionManager type="JDBC" commitRequired="false">
>>     <dataSource type="SIMPLE">
>>       <property name="JDBC.Driver"
>> value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
>>       <property name="JDBC.ConnectionURL"
>> value="jdbc:sqlserver://localhost:5356;databaseName=testdb"/>
>>       <property name="JDBC.Username" value="sam"/>
>>       <property name="JDBC.Password" value="sam"/>
>>       <property name="JDBC.DefaultAutoCommit" value="true" />
>>     </dataSource>
>>   </transactionManager>
>>
>>   <sqlMap resource="myapp/models/Population.xml"/>
>>   <sqlMap resource="myapp/models/Region.xml"/>
>> </sqlMapConfig>
>>
>> There is no error as such in connecting and querying but the values are
>> not populated into the bean. here is my region.xml
>>
>> <sqlMap namespace="Region">
>>
>>   <resultMap id="RegionResult" class="myapp.models.Region">
>>     <result property="regionId" column="region_id"/>
>>     <result property="regionName" column="region_name"/>
>>   </resultMap>
>>
>>     <select id="selectAllRegion" resultClass="myapp.models.Region">
>>         select region_id,region_name from Region
>>     </select>
>> </sqlMap>
>>
>> both reagion_id and region_name populated in the bean is null values..
>> where as.. for my other object ir Population,  population_id comes up but
>> other values are null.
>> The values are available in DB and normal JDBC programming can retrive the
>> values.
>>
>> Can anybody give me a solution?
>>
>> Thanks in advance,
>
>

lso manke sure you're using cursor mode... can't remember the exact JDB

Mime
View raw message