anyway to see the sql syntax generated by llblgen

Posts   
 
    
erichar11
User
Posts: 268
Joined: 08-Dec-2003
# Posted on: 23-Jan-2004 02:13:39   

quick question, I'm very new to database programming and have found llblgen pro to be great help. Was wondering is there any way to see the corresponding sql statement for a given llblgen pro command?

for example

llblgen code:

CustomerCollection customers = new CustomersCollection(); customers.GetMulti(null);

SQL code:

Select * from Customer

Thanks

bb22
User
Posts: 24
Joined: 23-Sep-2003
# Posted on: 23-Jan-2004 02:31:30   

erichar11 wrote:

Was wondering is there any way to see the corresponding sql statement for a given llblgen pro command?

The easiest way if you are using SQL Server is to use the Microsoft "Profiler" tool. It is installed with the SQL Server client. This tool allows you to capture all of the interactions with the SQL Server, including all of the SQL statements generated by LLBLGen.

There is plenty more that you can do with Profiler, but I am sure you can work that out simple_smile

erichar11
User
Posts: 268
Joined: 08-Dec-2003
# Posted on: 23-Jan-2004 09:41:42   

Thanks for the tip, just got profiler running and it should work just fine.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39826
Joined: 17-Aug-2003
# Posted on: 23-Jan-2004 09:48:43   

erichar11 wrote:

Thanks for the tip, just got profiler running and it should work just fine.

You can also step into the code, until you arrive into the DAO class, then step over the creation of the query (for example a selectQuery) and type in the command window in vs.net: (C#)

?((RetrievalQuery)selectQuery).ToString()

You can also click open the selectQuery's Command object and browse to the CommandText property's contents.

But profiler is the best choice simple_smile

Frans Bouma | Lead developer LLBLGen Pro
erichar11
User
Posts: 268
Joined: 08-Dec-2003
# Posted on: 23-Jan-2004 11:02:16   

thanks Frans for the insight, I like profiler better than steping into the code. smile

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39826
Joined: 17-Aug-2003
# Posted on: 23-Jan-2004 11:26:41   

erichar11 wrote:

thanks Frans for the insight, I like profiler better than steping into the code. smile

I agree simple_smile however it can sometimes be a little tricky because if you run some code which executes a lot of queries, which code started which query? simple_smile

Frans Bouma | Lead developer LLBLGen Pro