Name Redefined with multiple instances of include

Results 1 to 2 of 2

Thread: Name Redefined with multiple instances of include

  1. #1
    pkosmas Guest

    Default Name Redefined with multiple instances of include

    I want to use a banner engine i wrote, but I&#039;m getting trouble with the dimming of variables. I&#039;ve tried it without dimming, w/o option explicit, and dimming the variables only once in the header of the page, and I set the variables = Nothing in bottom of include. I always get either :<BR><BR>error &#039;800a0411&#039;<BR>Name redefined <BR>/includes/adrotator_468px.asp, line 3 <BR>Dim con, rsSelectedRecord, rsSelectedRecord_numRows, rsSelectedRecord_total<BR><BR>or:<BR><BR>error &#039;800a005b&#039;<BR>Object variable not set<BR>/includes/adrotator.asp, line 12* <BR><BR>the code looks like:<BR>&#060;% <BR>&#039;declares the variables to be used in the adrotator <BR>Dim con, rsSelectedRecord, rsSelectedRecord_numRows, rsSelectedRecord_total <BR>Dim varRowNum <BR>Dim strSQL1, strSQL2 <BR><BR>Set con = Server.CreateObject("ADODB.Connection") <BR>set rsSelectedRecord = Server.CreateObject("ADODB.Recordset") <BR>rsSelectedRecord.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data " & _ <BR>"Source=c:websiteslah.mdb;" <BR>rsSelectedRecord.Source = "SELECT * FROM adRotator WHERE blah... <BR><BR>*&#060;--last quoted line is line 12, the source of the "Object variable not set error"<BR><BR>btw, I also tried using "On Error Resume Next dim blah On Error GoTo 0" to turn off error checking, but that didnt work either...<BR><BR>thanks to the advanced gurus for any advice!!<BR>pk<BR><BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Name Redefined with multiple instances of incl

    jsut make sure all the valiables are only declared once. You must be declaring them once in the includes and again in the main page. Make sure they are only declared once.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts