Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 42532 invoked from network); 23 Mar 2006 08:55:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Mar 2006 08:55:16 -0000 Received: (qmail 70907 invoked by uid 500); 23 Mar 2006 08:55:14 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 70890 invoked by uid 500); 23 Mar 2006 08:55:13 -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 70875 invoked by uid 99); 23 Mar 2006 08:55:13 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Mar 2006 00:55:13 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of gnomeking@gmail.com designates 64.233.182.185 as permitted sender) Received: from [64.233.182.185] (HELO nproxy.gmail.com) (64.233.182.185) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Mar 2006 00:55:13 -0800 Received: by nproxy.gmail.com with SMTP id o25so270235nfa for ; Thu, 23 Mar 2006 00:54:51 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=t791Nq+Fm0Oimizm2paqI7bzmsGay2qt4xyHtbRQXOvAZ4Z0Nz/qrAeTNCrYYgenIB/7UrBd7mzH3p+lFNGgnQNCRRDR+OsqZY2JSPsdP5J8XBctOnFzEFLWcjDqOsrkTmLPXoqOuMGH8hfsiX6a3009cYCUF3h1ygrq4n/IYLE= Received: by 10.48.14.16 with SMTP id 16mr466271nfn; Thu, 23 Mar 2006 00:54:51 -0800 (PST) Received: by 10.48.255.15 with HTTP; Thu, 23 Mar 2006 00:54:51 -0800 (PST) Message-ID: Date: Thu, 23 Mar 2006 08:54:51 +0000 From: Bob To: "Bruce Wexler" Subject: Re: sql server 2k parameterized queries Cc: user-java@ibatis.apache.org In-Reply-To: <07D14BB1384B0F4B98CF3D1D48A9CA8C086D541F@mcexchange2.enterprise.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <07D14BB1384B0F4B98CF3D1D48A9CA8C086D541F@mcexchange2.enterprise.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Bruce, On 23/03/06, Bruce Wexler wrote: > Caused by: com.ibatis.dao.client.DaoException: Failed to queryForPaginate= dList - id [getProductListByCategory], parameterObject [DOGS], pageSize [4]= . Cause: com.ibatis.common.jdbc.exception.NestedSQLException: > --- The error occurred in com/ibatis/jpetstore/persistence/sqlmapdao/sql/= Product.xml. > --- The error occurred while applying a parameter map. > --- Check the getProductListByCategory-InlineParameterMap. > --- Check the statement (query failed). > --- Cause: java.sql.SQLException: [DataDirect][SQLServer JDBC Driver][SQL= Server]Invalid object name 'PRODUCT'. I'm no expert, but to me that indicates that it is connecting to the server and sending the query. The query is then coming back suggesting that SQL server had a problem with the request. In this case, it is suggesting to me that it cannot find the PRODUCT table. I would check three things... 1) Are you connecting to the correct server / table 2) Does the user you are connecting as have permissions to execute that query (I assume it does since you seem to be using sa) 3) Is the default table for your user the table you want to use Try using SQL Profiler to track what query is being made to the server, then Query Analyser to log in and check if you actually do have permissions to run that query. > database.properties file: > > driver=3Dcom.ddtek.jdbc.sqlserver.SQLServerDriver One other difference is that I am using the driver net.sourceforge.jtds.jdbc.Driver I'm also setting up the data source in tomcat's server.xml - but I guess thats not going to be your problem Bob