Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 57881 invoked from network); 12 Nov 2004 17:54:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 Nov 2004 17:54:20 -0000 Received: (qmail 49147 invoked by uid 500); 12 Nov 2004 17:54:17 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 49134 invoked by uid 500); 12 Nov 2004 17:54:17 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 48678 invoked by uid 99); 12 Nov 2004 16:49:14 -0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=DNS_FROM_RFC_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of pritam.paul@lycos.com designates 205.158.62.67 as permitted sender) X-OB-Received: from unknown (208.36.123.32) by wfilter.us4.outblaze.com; 12 Nov 2004 16:48:45 -0000 Content-Type: multipart/mixed; boundary="----------=_1100278124-31649-0" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Mailer: MIME-tools 5.41 (Entity 5.404) From: "Pritam Paul" To: torque-user@db.apache.org Date: Fri, 12 Nov 2004 11:48:44 -0500 Subject: Re: Unable to create Criteria object or executeQuery X-Originating-Ip: 209.104.159.113 X-Originating-Server: ws7-3.us4.outblaze.com Message-Id: <20041112164845.143333384B@ws7-3.us4.outblaze.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------------=_1100278124-31649-0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, Yes i corrected the configuration file and i am able to fetch data using 2 approach: 1. Perform a selective search using the records fetched from the first criteria results. 2. Run the complete sql-query directly using connection from torque as described by "Guy Galil" Also the sql query i have is too dynamic thus as (Thomas Fischer) explained= i didnt try with that "create view" approach. Though that also seems to be a feasible approach. Also i went through another posting as u mentioned with subject-name "Re: left outer join" which explains this approach of "create view". Anyway, the component is currently working, thx a lot for your help. regards, Pritam ----- Original Message ----- From: "Pritam Paul" To: torque-user@db.apache.org Subject: Unable to create Criteria object or executeQuery Date: Fri, 12 Nov 2004 09:27:43 -0500 --=20 _______________________________________________ Find what you are looking for with the Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.as= p?SRC=3Dlycos10 ------------=_1100278124-31649-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.41 (Entity 5.404) Received: from [209.104.159.113] by ws7-5.us4.outblaze.com with http for pritam.paul@lycos.com; Fri, 12 Nov 2004 09:27:43 -0500 From: "Pritam Paul" To: torque-user@db.apache.org Date: Fri, 12 Nov 2004 09:27:43 -0500 Subject: Unable to create Criteria object or executeQuery Importance: high X-Originating-Ip: 209.104.159.113 X-Originating-Server: ws7-5.us4.outblaze.com Hi, I have the following sql statement whose equivalent i need to generated usi= ng Criteria settings to fetch the results: [THIS SQL Query works well in SQL Server and Query explorer - to fetch 8 re= cords] ----------------------------------------------------------------- SELECT PME_EmpInfo.EMPLOYEEID,=20 PME_EmpInfo.FIRSTNAME,=20 PME_EmpInfo.LASTNAME,=20 PME_EmpInfo.SUPERVISORID,=20 PME_EmpInfo.DEPTNO,=20 PME_EmpInfo.DEPTNAME,=20 (SELECT (empinner.FirstName + ' ' + empinner.LastName)=20 FROM PME_EmpInfo empinner=20 WHERE PME_EmpInfo.SUPERVISORID =3D empinner.EmployeeID) AS Supervisor= Name, (SELECT phaseinner.PhaseName=20 FROM PME_Phase phaseinner=20 WHERE PME_Main.CURRENTPHASEID =3D phaseinner.PhaseID) AS PhaseName=20 FROM PME_EmpInfo INNER JOIN=20 PME_Main ON PME_EmpInfo.EMPLOYEEID =3D PME_Main.EMPLOYEEID INNER JOIN=20 PME_Phase ON PME_Main.CURRENTPHASEID =3D PME_Phase.PHASEID=20 WHERE (PME_Main.CURRENTSTATUSID=3D'7') AND (PME_EmpInfo.DEPTNO=3D'11080') ----------------------------------------------------------------- I tried using Criteria class but since i dont know Torque well i dont know = how this can be achieved using the Criteria class. I tried creating a Query obj= ect for this SQL statement and its (.toString()) method outputs this exact SQL = query. But how do i execute this query to fetch the results.=20 When i try using the BasePeer.executeQuery(sqlString) method, it complains = "There was no DataSourceFactory configured for the connection". Also how would i get the resultset object casted in such a way that i can r= ead the mentioned columns. In summary - how to execute a raw sql statement (which was generated by som= e other app layer) using torque and get the resultset? Any help is greatly appreciated. regards, Paul --=20 _______________________________________________ Find what you are looking for with the Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.as= p?SRC=3Dlycos10 ------------=_1100278124-31649-0 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org ------------=_1100278124-31649-0--