Persistent Class |
Namespace: AskiaCore
The Persistent type exposes the following members.
Name | Description | |
---|---|---|
InterviewsPath |
Full physical path to the /Interviews directory, where temporary interviews are persisted.
| |
ResourcesPath |
Full physical path to the /Resources directory, where resources will be stored during interviews.
| |
ResourcesUrl |
URL (relative) to the /Resources directory, used in web pages during interviews.
|
Name | Description | |
---|---|---|
EndDatabaseConnection |
Closes the connection of the main database used by AskiaCore
| |
EndWebProdDatabaseConnection |
Closes the webprod database connection
| |
InitDatabaseConnection |
Initializes the connection of the main database used by AskiaCore
| |
InitWebProdDatabaseConnection |
Initializes the connection to the webprod database
|
Management of the database connection in the Global.asax of the .NET web project
using AskiaCore; namespace MyApp { public class Global : HttpApplication { protected void Application_Start(object sender, EventArgs e) { // Initialize the database connection string (Where the survey was stored) Persistent.InitDatabaseConnection("connectionstring", DatabaseTypes.PORTAL); // Initialize the /Resources folder Path and URL Persistent.ResourcesPath = "C:\\Inetpub\\wwwroot\\MyApp\\Resources\\"; Persistent.ResourcesUrl = "/Resources/"; } protected void Application_End(object sender, EventArgs e) { // Release the database connection Persistent.EndDatabaseConnection(); } } }