ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Elcock" <brian.elc...@gmail.com>
Subject Re: Newbie trouble
Date Tue, 21 Mar 2006 18:21:09 GMT
Hello Kevin.

I think the DTD changed a bit, depending on what version you're using
and what documentation you're looking at. Here's what I have at the
top of my SqlMap file:

<sqlMap namespace="Product"
	xmlns="http://ibatis.apache.org/mapping"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

Try changing to something like that and see if it works.

Brian

On 3/21/06, Kevin Williams <kevinw@ecollege.com> wrote:
>
> I'm trying to test iBatis.Net but having all kinds of trouble. I can't get
> past the config files, but every XML validator in the world says they are
> valid.
>
> Here's me SqlMap.config:
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <sqlMapConfig
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> xsi:noNamespaceSchemaLocation="SqlMapConfig.xsd">
>
>
>
> <database>
>
> <provider name="sqlServer1.1"/>
>
> <dataSource name="ProofOfConcept"
> connectionString="server=XXX;Database=XXX;User ID=XXX;Password=XXX"/>
>
> </database>
>
> <sqlMaps>
>
> <sqlMap resource="Product.xml"/>
>
> </sqlMaps>
>
>
>
> </sqlMapConfig>
>
>
>
> Here is my Product.xml file:
>
>
>
> <?xml version="1.0" encoding="utf-8" ?>
>
> <sqlMap namespace="Product"
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>
> <alias>
>
> <typeAlias alias="Product" type="ProofOfConcept.Product,ProofOfConcept" />
>
> </alias>
>
> <resultMaps>
>
> <resultMap id="productResult" class="Product">
>
> <result property="Name" column="NAME"/>
>
> <!-- about 10 properties -->
>
>
>
> </resultMap>
>
>
>
> </resultMaps>
>
> <statements>
>
> <procedure id="GetAll" parameterMap="productParam"
> resultMap="productResult">
>
> GetAllProducts
>
> </procedure>
>
> </statements>
>
> <parameterMaps>
>
> <parameterMap id="productParam" class="Product">
>
> <parameter property="Name" column="NAME" />
>
> </parameterMap>
>
> </parameterMaps>
>
> </sqlMap>
>
>
>
>
>
> I tried running NPetShop but it would just throw errors as well. How can I
> get a working example to build off of? I really don't want to use ADO.NET
> directly but I'm not allowed to run any dynamic SQL -generating ORM tools.
> Please help!
>
>
>
> Cheers,
>
> Kevin

Mime
View raw message