FAQ/Questions/ConnectionStringRW.md
... ...
@@ -0,0 +1,47 @@
1
+##Question
2
+
3
+How do I add Read-Write user permission to DB?
4
+
5
+##Answer
6
+
7
+Using 'ConnectionStringRW' property, user permissions to DB can be specified. This property should be assigned similarly to normal connection string as below - in the initialization of reporting.
8
+
9
+```csharp
10
+
11
+ public class CustomAdHocConfig : FileSystemAdHocConfig {
12
+ public static void InitializeReporting() {
13
+ //Check to see if we've already initialized.
14
+ if (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null)
15
+ return;
16
+ //Initialize System
17
+ AdHocSettings.LicenseKey = " License Key Here";
18
+ AdHocSettings.SqlServerConnectionString = @" Connection String Here";
19
+ AdHocContext.Driver.ConnectionStringRW = @" Connection String RW Here"; // ConnectionStringRW was used
20
+
21
+ }
22
+}
23
+```
24
+If it's not assigned, Izenda as before uses Driver.ConnectionString for all operations against DB
25
+
26
+
27
+4) If ConnectionStringRW is also assigned, then Izenda will
28
+
29
+ a) Use Driver.ConnectionString for Read-Only operations against DB, thus Driver.ConnectionString can have ReadOnly access to the DB
30
+
31
+ b) Use Driver.ConnectionStringRW for Read-Write operations. At this moment this includes only following:
32
+
33
+ - Create Reports table if it doesn't exist
34
+
35
+ - Create/Update/Delete Thumbnails in Reports table in Database mode
36
+
37
+ - Create/Update/Delete Forms in Reports table in Database mode
38
+
39
+ - Create/Save/Delete ReportSets in Reports table in Database mode
40
+
41
+
42
+Here is the video explaining how to create ReadOnly connection string in MSSQL: http://www.screencast.com/users/IzendaReports/folders/Temporary/media/9a2e633c-bbc7-4c47-9425-8df36d36e368
43
+
44
+6) Here is video demonstrating how installation works when Driver.ConnectionStringRW is assigned for read-write operations, and Driver.ConnectionString has ReadOnly access: http://www.screencast.com/users/IzendaReports/folders/Temporary/media/a04a117c-89d1-40f3-8053-55d0d7586d1a
45
+
46
+
47
+Really it can be used always. General case is just safety improvement - if user specifies ConnectionStringRW, and uses read-only DB account for usual Driver.ConnectionString - he can be 100% sure that users will not be able to modify anything in DB by any means - like using SQL injections. Just because everything which user can input - goes to DB via read-only connection string.