View Full Version : Multiple databases

01-04-2007, 08:06 PM
Hello all. I have two databases with identical structure but different data. I have also created an application to generate reports off the data within the databases. The thing is, since all the table structures are the same, I just want to use the same application to see either database, depending on what the user picks.

I am trying to get the following <Include> to work, but not sure why it's not.

Area = Request.QueryString("Area")
<% If Area = "1" Then %>
<!--#include file="Connections/ESH_Roports1.asp" -->
<% End If %>
<% If Area = "3" Then %>
<!--#include file="Connections/ESH_Roports3.asp" -->
<% End If %>

This is the error that I am receiving:

Microsoft VBScript compilation error '800a0411'

Name redefined

/esh_reports/Connections/ESH_Roports3.asp, line 8


I understand that it is trying to process both include files, but how can I get it to work with the IF-Then statement?

Thanks in advance,


01-04-2007, 10:44 PM
post your code from ESH_Roports3.asp

01-12-2007, 07:37 PM
just noticed somethin in your code

im not an ASP developer but i assume that the operators are the same

in your IF you have

If Area = "3" Then %>

should that not be ... ==

If Area == "3" Then %>