Return-Path: Delivered-To: apmail-ibatis-dev-archive@www.apache.org Received: (qmail 81067 invoked from network); 11 Aug 2006 04:52:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Aug 2006 04:52:02 -0000 Received: (qmail 10210 invoked by uid 500); 11 Aug 2006 04:52:02 -0000 Delivered-To: apmail-ibatis-dev-archive@ibatis.apache.org Received: (qmail 10194 invoked by uid 500); 11 Aug 2006 04:52:01 -0000 Mailing-List: contact dev-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ibatis.apache.org Delivered-To: mailing list dev@ibatis.apache.org Received: (qmail 10176 invoked by uid 99); 11 Aug 2006 04:52:01 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Aug 2006 21:52:01 -0700 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [68.142.200.115] (HELO web30502.mail.mud.yahoo.com) (68.142.200.115) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 10 Aug 2006 21:51:52 -0700 Received: (qmail 27403 invoked by uid 60001); 11 Aug 2006 04:51:20 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=AIaguVn3+0R0Vy1rpEIDxlk3hiyUBkOPWuBoN9C9Xu78o2KydCv33dqRe9mR4ySpz2E1hFexoid+eUvMc7X1hCEztH8i1Vgkbhu3g2GOK7TDW/NR+yZOHK4rrXQy8YqwcH/4Lw/uJoC9QdSW/23xkLeozP4IDZmwMw80JQIcz70= ; Message-ID: <20060811045120.27401.qmail@web30502.mail.mud.yahoo.com> Received: from [24.208.153.243] by web30502.mail.mud.yahoo.com via HTTP; Thu, 10 Aug 2006 21:51:20 PDT Date: Thu, 10 Aug 2006 21:51:20 -0700 (PDT) From: Ron Grabowski Subject: Re: IBatisNet can't set SqlCommand's Connection property under Mono To: dev@ibatis.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Changing the code in SqlMapSession.CreateCommand() from this: IDbCommand command = _dataSource.DbProvider.CreateCommand(); command.CommandType = commandType; command.Connection = _connection; to this: SqlCommand command = (SqlCommand)_dataSource.DbProvider.CreateCommand(); command.CommandType = commandType; command.Connection = _connection; solved the problem. I want to use IDbCommand and not SqlCommand. --- Gilles Bayon wrote: > Its seems that the set connection on SqlCommand attend a > SqlConnection and > that a IDbConnection wa passed which cause the cast exception. You > should > check your provider.. >