Unless a database connection string is specified in the configuration file, 1 Click DB requires a session cookies to track dynamic login information. If this cookie expires, or is blocked by a firewall or browser security policy you will see the message "Your 1 Click DB session has expired". Code Wizard users generally hard code configuration information for pages in the ocdConnectInfo.asp file.
It is recommended that all 1 Click DB connections use only recent versions of the standard MS OLEDB drivers and not the (now officially, more or less) obsolete ODBC drivers when connecting to MS Access or SQL Server. If for some reason you need to use a DSN, keep in mind it only has to be created on the web server that 1 Click DB is running on. You do not need to set it up for individual machines just connecting from a browser. If you are using SQL Server, the database does not have to be on the same machine as the web server. For MS Access, the database should be on a local harddrive of the webserver. Mapped drives are also possible but they can be tricky to setup (see notes below).
Check http://microsoft.com/data/ for the latest version of the Microsoft Data Access library (MDAC) which includes all MS OLEDB drivers.
Troubleshooting Guide for 80004005 Errors
MS SQL Server Connection Syntax
Here is an example of basic ADO Connect string to an SQL Server database :
provider=SQLOLEDB; data source=127.0.0.1,1433; initial catalog=northwind; Network Library=dbmssocn;
The syntax above specifies that SQL Server is running on the standard port 1433. Specifying the port after the IP address with a comma is optional this default is used.
Notes : Using http:// before an IP is not a valid value for a MS SQL data source / Server Name. The 1 Click DB Connect Wizard also includes support for Trusted and/or Encrypted options that may not be supported by all MS SQL installations.
Common MS SQL Server Error Messages
Microsoft Access Connection Syntax
Here is an example of basic ADO Connect string to an Access 2000 or 2002 XP database :
provider=Microsoft.Jet.OLEDB.4.0; data source=c:\inetpub\data\northwind2000.mdb;
Notice that the MS Access provider needs a physical path to the database and not a relative path from web root. If you want to just hard code the database connection in Config.asp or FreeConfig.asp (depending on version) you can use the following syntax for a relative path (be sure this is all on one line of code) :
ocdADOConnection = "provider=Microsoft.Jet.OLEDB.4.0;data source=" &
server.mappath("/data/northwind2000.mdb")
Otherwise you could create a new asp page with the following code and then run it to show the full path to the web page:
<%
Response.Write(Server.MapPath(Request.ServerVariables("SCRIPT_NAME")))
%>
The code will actually show the path to the .asp file it runs in, but from that one should be able to figure out the database path without much trouble.
Notes : Earlier versions of MS Access or the JET OLEDB vider are supported by 1 Click DB but not recommended for use on the web. Keep a Jet 4.0 Database in Top Working Condition
Common MS Access Error Messages
For Microsoft Access databases, these messages often occur when the MDB file is read-only mode on your server. MDB files must be in read/write mode with full access privileges for Windows/NT user account connecting to the data (usually IUSR_MACHINENAME). The directory the database is in generally also needs permissions to create and delete Access' .LDB locking file. Finally the Windows temporary system directories need certain permissions to create other temporary files for normal operation. If you use Microsoft FrontPage to upload your database this may be happening automatically for you. If you don't have privileges to change file permissions, talk to your web host administrator. If possible, convert your MDB file to the latest version of Microsoft Access as well.
Keep in mind that errors in your SQL syntax can cause problems as well. These issues will vary between databases, for instance in Microsoft Access if you try to join fields containing Memo or OLE Object data, an error will occur.
Oracle Connection Syntax
Here is an example of basic ADO Connect String to an Oracle 8 or 9 database :
provider=msdaora;data source=ocd;
Notes : For using Oracle with 1 Click DB, the MS OLEDB vider for Oracle which is included in standard MDAC ADO downloads. Other providers will generally work okay but can be harder to configure and are not as fast.
For the Oracle connection data source is the TNS service name or other Oracle network service name. As long as Oracle, IIS and ADO are all setup correctly it should work fine. Be sure to investigate Oracle's TechNet at http://otn.oracle.com for lots of good troubleshooting information and other technical documentation
Common Oracle Error Messages
Working with Other Databases
Please note that Excel is very picky about having data in a "clean" tabular format for use with ADO providers
mySQL connection strings should include Option=651 to ensure ADO receives schema information from the ODBC driver for proper operation of 1 Click DB Software.
We have had limited success using 1 Click DB for Visual FoxPro databases using this ADO Connection syntax:
Driver={Microsoft Visual FoxPro Driver};
SourceType=DBF;SourceDB=c:\inetpub\data\vfp\;
Exclusive=No;
OLEDB drivers for FoxPro have even more limited capabilities and it should be noted they are not certified for use with ADO.NET OLEDB vider.
Please note, display of the following message by 1 Click DB indicates a problem with the configuration of your web server :
WARNING! An Unexpected Error Occured Processing Your Request: -2147319779 -
Please refer to Microsoft Knowledge Base Article 278846 for instructions on resolving the most common causes of this error