PRB: 80004005 Error Using Data Range Header and Footer Controls

ID: Q201004


The information in this article applies to:
  • Microsoft Visual InterDev, version 6.0


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=sa;PASSWORD=;SERVER=(local);UID=sa;APP=Microsoft Development Environment;WSID=MCAI0;DATABASE=pubs"
      Application("Connection1_ConnectionTimeout") = 15
      Application("Connection1_CommandTimeout") = 30
      Application("Connection1_CursorLocation") = 3
      Application("Connection1_RuntimeUserName") = "sa"
      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=sa;PASSWORD=;SERVER=(local);UID=sa;APP=Microsoft Development Environment;WSID=MCAI0;DATABASE=pubs"
      Application("Connection1_ConnectionTimeout") = 15
      Application("Connection1_CommandTimeout") = 30
      Application("Connection1_CursorLocation") = 3
      Application("Connection1_RuntimeUserName") = "sa"
      Application("Connection1_RuntimePassword") = ""

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


STATUS

This behavior is by design.

Additional query words: kbDSupport

Keywords : kbASP400 kbCtrl kbVisID100 kbVisID600 kbGrpASP
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: February 8, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.