Identifying Predefined Roles on SQL Server Reporting Services 2005 (SSRS)

17 April, 2007 (17:28) | .net | No comments

I was given the task of writing some code to add a user or group to a role on a SQL 2005 Express Edition Reporting Services server.

The natural answer to the problem of giving users access to a Reporting Services server is to create your own roles for which only the required Tasks are allowed.

Creating roles is not allowed as it is a limitation of Express Edition. So - your best bet is to find the most suitable predefined role to assign your user / group to.

The single biggest issue I found in trying to do this was identifying the predefined roles.


Adding a column with DataType VarBinaryMax using SMO

24 August, 2006 (00:48) | .net | 1 comment

I have discovered that the following code does not behave as expected…
Table someTable = database.Tables["some_table"];
Column someColumn = new Column (someTable, "some_column", DataType.VarBinaryMax);
someTable.Columns.Add(someColumn);
someTable.Alter();

This code will actually add a column of type varbinary(1) to the database. The following works…
Column someColumn = new Column (someTable, "some_column", DataType.VarBinary(-1));
Oh well.