Frank.
I'm guessing that you're using a more recent version of IBatis than
was used in the tutorial. The API changed a bit back somewhere between
1.2 and 1.3, so you won't be able to run the tutorial as written if
you're using the latest version of the binaries. I can't remember the
exact details. If you want to run the tutorial as written, you'll need
to download an older version of the binaries. Otherwise, you'll need
to look at the code and adjust it per Tom's suggestions.
Regards.
Brian
On 10/22/07, Nguyen, Tom <[EMAIL PROTECTED]> wrote:
>
>
>
>
> As the error said, you have two choices:
>
>
>
>
>
> public ISqlMapper Mapper()
>
> {
>
> return IBatisNet.DataMapper.Mapper.Instance();
>
> }
>
>
>
> Or:
>
> public SqlMapper Mapper()
>
> {
>
> return (IBatisNet.DataMapper.Mapper.Instance() as
> SqlMapper);
>
> }
>
>
>
>
>
>
> Regards,
>
>
> Tom Nguyen
> Sr. Developer
> [EMAIL PROTECTED]
>
>
>
> ________________________________
>
>
> From: Frank van Tour [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 22, 2007 2:46 PM
> To: [email protected]
> Subject: Newbie ibatis Tutorial Error
>
>
>
> Hi ,
>
>
>
> Just started with ibatis tutorial 1.2.1. ( the .net 2.0 tutorial URL failed
> to download ??).
>
> In the singleton class ( as listed below ) I got the following error (Using
> VS2005 and .Net 2.0)
>
>
>
>
>
> Cannot implicitly convert type 'IBatisNet.DataMapper.ISqlMapper' to
> 'IBatisNet.DataMapper.SqlMapper'.
>
> An explicit conversion exists (are you missing a cast?)
>
>
>
> Any clues what's going on here?
>
>
>
> -Frank
>
>
>
> using IBatisNet.DataMapper;
>
>
>
> namespace iBatis
>
> {
>
> /// <summary>
>
> /// Base class for Mapper objects (*Mapper).
>
> /// Provides shared utility methods.
>
> /// </summary>
>
> public abstract class MapperBase
>
> {
>
> public SqlMapper Mapper()
>
> {
>
> return IBatisNet.DataMapper.Mapper.Instance ();
>
> }
>
> }
>
> }
>
>
>
> ________________________________
>
>
>
>
> This e-mail message and any files transmitted herewith, are intended solely
> for the use of the individual(s) addressed and may contain confidential,
> proprietary or privileged information. If you are not the addressee
> indicated in this message (or responsible for delivery of this message to
> such person) you may not review, use, disclose or distribute this message or
> any files transmitted herewith. If you receive this message in error,
> please contact the sender by reply e-mail and delete this message and all
> copies of it from your system.
>
> ________________________________
>
>
>
>
>
>
>
>
>
>
>