how log sql query?

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
12/13/2010 9:38:33 AM
Gravatar
Total Posts 2

how log sql query?

how can I log queries mojoPortal?
exists a method to activate some logs files

12/13/2010 9:44:49 AM
Gravatar
Total Posts 550

Re: how log sql query?

Hi,

What means sql query? Please explain more about what you want to do ,may we can help you.

Asad,

 

 

 

12/13/2010 9:56:01 AM
Gravatar
Total Posts 2

Re: how log sql query?

you could use the 'ODBC database so that you can use the' analysis windows ?

I'd need to log queries on the database record entryI'd need to log queries on the database record entry

12/13/2010 10:00:35 AM
Gravatar
Total Posts 550

Re: how log sql query?

Sorry I don't any things about what you talk about it. Wait ,other users may help you.

 

12/13/2010 11:05:53 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: how log sql query?

Are you asking how to use the SQL query tool that's built into mojoPortal? If so, it is documented here.

Jamie

12/13/2010 12:59:38 PM
Gravatar
Total Posts 18439

Re: how log sql query?

There is nothing built into mojoPortal for logging sql activity. There are tools for most database platforms that can do this, for MS SQL there is SQL Profiler but this tool is not included in the free Express versions of MS SQL.

Hope it helps,

Joe

12/19/2010 7:02:23 PM
Gravatar
Total Posts 8

Re: how log sql query?

for sql server you could simply log the queries passed to SqlParameterHelper Constructors .

look at SQLParameterHelper.cs in sql server data access layer .

12/21/2010 8:35:34 AM
Gravatar
Total Posts 18439

Re: how log sql query?

For the MS SQL data layer I will add logging in the Execute* methods of SQLParamterHelper like this:

if (log.IsDebugEnabled) { log.Debug("ExecuteReader " + commandText); }

so one could enable this logging by setting the log level in the log4net.config to DEBUG and it will log the command text which is only going to be the stored procedure name.

 

You must sign in to post in the forums. This thread is closed to new posts.