Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 23669 invoked from network); 25 Aug 2005 18:38:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Aug 2005 18:38:37 -0000 Received: (qmail 26813 invoked by uid 500); 25 Aug 2005 18:38:36 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 26633 invoked by uid 500); 25 Aug 2005 18:38:35 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 26620 invoked by uid 99); 25 Aug 2005 18:38:34 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Aug 2005 11:38:34 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [196.40.46.55] (HELO mail.inet.co.cr) (196.40.46.55) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 25 Aug 2005 11:38:51 -0700 Received: (qmail 31034 invoked from network); 25 Aug 2005 18:38:31 -0000 Received: from unknown (HELO ?192.168.1.33?) (192.168.1.33) by mail.inet.co.cr with SMTP; 25 Aug 2005 18:38:31 -0000 Message-ID: <430E0F77.5020702@inet.co.cr> Date: Thu, 25 Aug 2005 12:35:35 -0600 From: Eduardo Lobo User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: user-java@ibatis.apache.org Subject: Strange Problem.. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, My problem is this: I create this SP(in SQL Server 2000): create procedure create_person @name varchar(80) as begin declare @id int insert Person (Name) values (@name) Set @id = SCOPE_IDENTITY() select Id, Name from Person where Id = @id end GO This is the XML Map: {call create_person (#name#)} This is the java code: SqlMapClient sqlMap = null; try { String file = "SQLConfigMap.xml"; Reader reader = Resources.getResourceAsReader(file); sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader); HashMap params = new HashMap(); params.put("name", "David"); Object obj = sqlMap.queryForObject("create_person", params); System.out.println("create_person: " + obj); } catch (Exception e) { System.out.println(e.getMessage()); } Results: Finally when I print the result I got the new Record info, Person: id = 1, name = David That's fine, but when I check the Table there's not record... But the strange is that it returns the mapped object with the new data, like if it was successfully inserted. The "Id" field from the table Person is Identity (automatic sequential), and if I try to insert the record again then a I get the next "Id" (Person: id = 2, name = David), but again nothing is in the table.. Thanks for the help. Eduardo Lobo