The _2020applications_connection.asp file contains variables and information required to build the connection string used to connect to the 20/20 DataShed database. This file is modified automatically by the "Database Utilities" interface, but may also be edited manually in a text editor such as Notepad.
This file may inherit the permissions from its parent folder; but also requires that the IUSR_<localmachinename> (or equivalent) user account have NTFS permissions to read and modify the contents of the file.
For comprehensive NTFS file and folder permission settings please see File/Folder Security (NTFS Permissions).
This file does not require internal security measures.
This file does not require maintenance. However, if you have altered the connection string or the properties made available in the "Database Utilities" interface, then we recommend that you make a backup copy of both the original and the modified copy.
This file is included (via SSI) in the following:
The following files are available (via SSI) in _2020applications_connection.asp:
If using a Microsoft Access database, we recommend this file should not be edited manually. Instead we encourage you to use the "Database Utilities" interface to control the variables available in this file.
However, in some cases (such as those using SQL Server) it may be necessary to adjust this file manually.
If it's necessary to alter this file manually, then follow these steps:
Here is a list of all available variables:
These settings and variables are well documented within the source code.
This file contains an additional feature which is documented here but is rarely of use to most customers except under special circumstances. In rare cases, it may be useful to connect 20/20 DataShed to multiple data sources. For example the MLS integration created and provided by Veara, Inc. makes use of this unique feature.
The list of variables (above) are stored in an array called arrConnectionProperties. At the bottom of the "_2020applications_connection.asp" is the following code:
dim arrConnectionProperties(0,13)
arrConnectionProperties(0,0) = booleanCacheConnectionString
arrConnectionProperties(0,1) = booleanShowConnectionString
arrConnectionProperties(0,2) = intDataProviderOption
arrConnectionProperties(0,3) = strDSNName
arrConnectionProperties(0,4) = strDatabaseFileName
arrConnectionProperties(0,5) = booleanUseAbsolutePath
arrConnectionProperties(0,6) = strFolderLocation
arrConnectionProperties(0,7) = booleanUsePassword
arrConnectionProperties(0,8) = strSQLDataSource
arrConnectionProperties(0,9) = strSQLAddress
arrConnectionProperties(0,10) = strSQLUid
arrConnectionProperties(0,11) = strSQLPwd
arrConnectionProperties(0,12) = strSQLNetworkLibrary
arrConnectionProperties(0,13) = "Local Database"
The arrConnectionProperties variable stores a multi-dimensional array. The array contains one (1) row with thirteen (13) columns. Each "row" represents one (1) data source -- and the columns of that row store the information required to connect to that data source. In effect then, additional data sources can be defined by adding more rows. Each row becomes known within the software as a "Data Source" and each one has a "Data Source Index" (abbreviated within the software as a "DSI"). In other words, 20/20 DataShed can build connection strings (on-the-fly) to more than one database and the software can be connected (on-the-fly) to any of the available data sources. This can give the impression of having multiple databases operating with 20/20 DataShed simultaneously.
For example, if a second or third data source were available then the code might look like the following:
' the blue number below represents the number of rows in the array
' but remember that it's a zero-based array...so, zero is the first
' and the number 2 actually means there are three rows.
dim arrConnectionProperties(2,13)
arrConnectionProperties(0,0) = booleanCacheConnectionString
arrConnectionProperties(0,1) = booleanShowConnectionString
arrConnectionProperties(0,2) = intDataProviderOption
arrConnectionProperties(0,3) = strDSNName
arrConnectionProperties(0,4) = strDatabaseFileName
arrConnectionProperties(0,5) = booleanUseAbsolutePath
arrConnectionProperties(0,6) = strFolderLocation
arrConnectionProperties(0,7) = booleanUsePassword
arrConnectionProperties(0,8) = strSQLDataSource
arrConnectionProperties(0,9) = strSQLAddress
arrConnectionProperties(0,10) = strSQLUid
arrConnectionProperties(0,11) = strSQLPwd
arrConnectionProperties(0,12) = strSQLNetworkLibrary
arrConnectionProperties(0,13) = "Data Source #1"
arrConnectionProperties(1,0) = True
arrConnectionProperties(1,1) = False
arrConnectionProperties(1,2) = 2
arrConnectionProperties(1,3) = ""
arrConnectionProperties(1,4) = "myOtherDatabase.mdb"
arrConnectionProperties(1,5) = True
arrConnectionProperties(1,6) = "C:\Inetpub\Databases\"
arrConnectionProperties(1,7) = True
arrConnectionProperties(1,8) = ""
arrConnectionProperties(1,9) = ""
arrConnectionProperties(1,10) = ""
arrConnectionProperties(1,11) = ""
arrConnectionProperties(1,12) = ""
arrConnectionProperties(1,13) = "Data Source #2"
arrConnectionProperties(2,0) = True
arrConnectionProperties(2,1) = False
arrConnectionProperties(2,2) = 5
arrConnectionProperties(2,3) = ""
arrConnectionProperties(2,4) = "myDatabase"
arrConnectionProperties(2,5) = False
arrConnectionProperties(2,6) = ""
arrConnectionProperties(2,7) = False
arrConnectionProperties(2,8) = mySQLServerName.com/mySQLInstance,1433
arrConnectionProperties(2,9) = ""
arrConnectionProperties(2,10) = "user_name"
arrConnectionProperties(2,11) = "pass_word"
arrConnectionProperties(2,12) = strSQLNetworkLibrary
arrConnectionProperties(2,13) = "Data Source #3"
Some notes about the code above:
This is fictional of course -- the code above is merely an example.
The code defines three (3) distinct data sources. Visitors of the website can browse and search all of those databases if the webmaster provides appropriate hyperlinks and/or with an option in 20/20 DataShed's search form. (This topic is discussed more in _globals.asp.)
The blue text represents the bits of code that are different for each distinct data source.
In the first data source (DSI 0), the local variables are used. This means that the "Database Utilities" tool in 20/20 DataShed will automatically manage those variables through the on-screen interface.
In the second and third data sources (DSI 1 and DSI 2), the properties are defined by constants -- not variables. This means that the connection properties for those data sources must be managed in this file manually by modifying the source code directly.
If multiple data sources are to be used, then the webmaster must edit this "_2020applications_connection.asp" file manually to configure these features.
If multiple data sources are defined in "_2020applications_connection.asp", then 20/20 DataShed will build connection strings for each one and will store that information in memory for easy access.
If you must access this file using another product or software, do so at your own risk; such activity is not supported by our license agreement and may void 20/20 Applications' technical support obligations.