PRB: Error 80004005 When You Use Data Range Header and Footer Controls (201004)



The information in this article applies to:

  • Microsoft Visual InterDev 6.0

This article was previously published under Q201004

SYMPTOMS

When using the Data Range Header and Footer Controls created under Visual InterDev 1.0 within Visual InterDev 6.0, the following error may occur:
Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified /Gallery3/ASP Page1.asp, line 76

CAUSE

The Global.asa Visual InterDev 6.0 generates is different from the Global.asa Visual InterDev 1.0 generates. Visual InterDev 6.0 uses Application Variables for data connections unlike Visual InterDev 1.0 which uses Session Variables for data connections. The Data Range Header control uses Session Variables to address the data connection information. As a result, the Data Range Header/Footer controls are unable to find the corresponding Session Variables in the Global.asa, causing the error.

RESOLUTION

Copy the Application Variables for your data connection and rename them as Session Variables. For example, if your Global.asa reads the following:
Application("Connection1_ConnectionString") = "DSN=pubs;User Id=<username>;PASSWORD=<strong password>;SERVER=(local);UID=<username>;APP=Microsoft Development Environment;WSID=MCAI0;DATABASE=pubs"
      Application("Connection1_ConnectionTimeout") = 15
      Application("Connection1_CommandTimeout") = 30
      Application("Connection1_CursorLocation") = 3
      Application("Connection1_RuntimeUserName") = "username"
      Application("Connection1_RuntimePassword") = ""
				

change the above section to the following for the Data Range Header/Footer control to work properly:
Application("Connection1_ConnectionString") = "DSN=pubs;User Id=<username>;PASSWORD=<strong password>;SERVER=(local);UID=<username>;APP=Microsoft Development Environment;WSID=MCAI0;DATABASE=pubs"
      Application("Connection1_ConnectionTimeout") = 15
      Application("Connection1_CommandTimeout") = 30
      Application("Connection1_CursorLocation") = 3
      Application("Connection1_RuntimeUserName") = "username"
      Application("Connection1_RuntimePassword") = ""

      Session("Connection1_ConnectionString") = "DSN=pubs;User Id=<username>;PASSWORD=<username>;SERVER=(local);UID=<username>;APP=Microsoft Development Environment;WSID=MCAI0;DATABASE=pubs"
      Session("Connection1_ConnectionTimeout") = 15
      Session("Connection1_CommandTimeout") = 30
      Session("Connection1_CursorLocation") = 3
      Session("Connection1_RuntimeUserName") = "username"
      Session("Connection1_RuntimePassword") = ""
				

STATUS

This behavior is by design.

Modification Type:MajorLast Reviewed:10/30/2003
Keywords:kbCtrl kbprb KB201004