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" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Unable to create Criteria object or executeQuery Date: Fri, 12 Nov 2004 09:27:43 -0500 -- _______________________________________________ Find what you are looking for with the Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10
--- Begin Message ---Hi, I have the following sql statement whose equivalent i need to generated using Criteria settings to fetch the results: [THIS SQL Query works well in SQL Server and Query explorer - to fetch 8 records] ----------------------------------------------------------------- SELECT PME_EmpInfo.EMPLOYEEID, PME_EmpInfo.FIRSTNAME, PME_EmpInfo.LASTNAME, PME_EmpInfo.SUPERVISORID, PME_EmpInfo.DEPTNO, PME_EmpInfo.DEPTNAME, (SELECT (empinner.FirstName + ' ' + empinner.LastName) FROM PME_EmpInfo empinner WHERE PME_EmpInfo.SUPERVISORID = empinner.EmployeeID) AS SupervisorName, (SELECT phaseinner.PhaseName FROM PME_Phase phaseinner WHERE PME_Main.CURRENTPHASEID = phaseinner.PhaseID) AS PhaseName FROM PME_EmpInfo INNER JOIN PME_Main ON PME_EmpInfo.EMPLOYEEID = PME_Main.EMPLOYEEID INNER JOIN PME_Phase ON PME_Main.CURRENTPHASEID = PME_Phase.PHASEID WHERE (PME_Main.CURRENTSTATUSID='7') AND (PME_EmpInfo.DEPTNO='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 object for this SQL statement and its (.toString()) method outputs this exact SQL query. But how do i execute this query to fetch the results. 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 read the mentioned columns. In summary - how to execute a raw sql statement (which was generated by some other app layer) using torque and get the resultset? Any help is greatly appreciated. regards, Paul -- _______________________________________________ Find what you are looking for with the Lycos Yellow Pages http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10
--- End Message ---
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
