View Query - Self Servicing

Posts   
 
    
jackscoldsweat avatar
Posts: 16
Joined: 11-Oct-2004
# Posted on: 04-Nov-2004 21:14:54   

Hi there

I'm having difficulty getting a resultset back for what would be a "join" query in SQL using relations and predicates.

I can write the SQL into SQL Server Query Analyser and get the result I want but when I attempt to do the same thing via a relationcollection and Predicate I get no result - so I know I am not quite doing something right.

I'm wondering if it is possible (because we are using self-servicing not adapter) to view the SQL query that is being generated?

regards

Randall

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 04-Nov-2004 21:47:19   

You can step into the DAO class in the debugger and step OVER the method call which creates the IRetrievalQuery object. When you step OVER that line, you can examine the query in the locals window in the debugger, click open the selectQuery object and browse to the _command object which contains a commandText property.

If you're using VB.NET, this is not visible to you because the VB.NET IDE team thought it wouldn't be interesting, so you then have to do in the intermediate window:

?(CType(selectQuery, RetrievalQuery).ToString())

Frans Bouma | Lead developer LLBLGen Pro
jackscoldsweat avatar
Posts: 16
Joined: 11-Oct-2004
# Posted on: 04-Nov-2004 22:00:07   

Thanks! I'll give it a go... smile