What DotNetNuke IsAdminControl function does.

The class \DNNLibrary\Components\Skins\Skin.vb (and some others) call DotNetNuke.Common.Globals.IsAdminControl()  function.

There is no description in the function, and the code has too many negatives, that it is not obvious.

Once I figured it out, I decided to write it here.

The function returns True, if QueryString has “MID“ or “CTL“ parameter.

I am not fully understand, why it means an Admin contol.

There is some clarification in the document: http://www.yourephotostore.com/LinkClick.aspx?link=SSL_ModuleV3.pdf&mid=488

where you cannot add a module to them or where the “Display on All

When a page is called with a query string parameter of "ctl", "mid" or "def" a different module loading procedure is called in the skin.vb module. These three parameters are used to define exactly what module/controlis to be loaded. This only loads the ONE module defined in parameters. Because the page can be called without changing the tabID, there is no way to get to this page to add the module. This may seem a little contrary to initial impressions of how DotNetNuke works,
but this is the way that module configuration edit routines are called. For example, when you go to the configuration screen for this module, look at the URL, you will see that it has the same tabID value from the calling page.

Pages” module option does not work.

I am not sure where “def“ parameter is used.

Also parameters tabid, ctl, mid explained in DNN documentation “DotNetNuke 3.0 Module Developer’s Guide“, section “One Page Many Controls“.

DotNetNuke.UI.Skins.Skin.Page_Init method calls IsAdminControl()  and if it is true, loads only specified by "ctl" or  "mid" module.

 

 

MS Access Project uses incorrect SQL if RecordSource starts with leading space.

I had a MS Access 2002 VB code

Form.RecordSource = " Select * from dbo.[TempBarcodesList]  where SessionID= " & Quoted(hdnSessionID)

with a leading space before Select in SQL statement.

Profiler showed that the following SQL was send to the database 

 exec sp_executesql N'SELECT * FROM   Select * from dbo.[TempBarcodesList]  where SessionID= ''2006-02-22 12:07:06.327''  WHERE "SessionId" = @P1 AND "AutoID" = @P2', N'@P1 varchar(23),@P2 bigint', '2006-02-22 12:07:06.327', 22 

and it obviosly had sintax errors.

When the leading space  was remove access inserted brackets and generated SQL became correct:

exec sp_executesql N'SELECT * FROM ( Select * from dbo.[TempBarcodesList]  where SessionID= ''2006-02-22 11:49:48.043'' ) AS DRVD_TBL WHERE "SessionId" = @P1 AND "AutoID" = @P2', N'@P1 varchar(23),@P2 bigint', '2006-02-22 11:49:48.043', 12 

 

 

«February»
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
2627281234
567891011