ShMiL
04-14-2005, 03:12 PM
I have this subroutines used for opening and closing of DB.
dim conn
Sub dbConn ()
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("../db/l**h.mdb") & ";Persist Security Info=False"
End Sub
Sub dbClose ()
conn.close
set conn=nothing
End Sub
this is in funcs.asp.
now, I use top.inc and bot.inc for header and footer for my pages.
I included func.asp in top.inc and it works fine - all the pages who has top.inc included with them are working fine.
the problem is with pages that directly includes funcs.asp
I get this error:
Microsoft VBScript compilation error '800a0411'
Name redefined
/board/web/funcs.asp, line 2
dim conn
----^
what could i do?
dim conn
Sub dbConn ()
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("../db/l**h.mdb") & ";Persist Security Info=False"
End Sub
Sub dbClose ()
conn.close
set conn=nothing
End Sub
this is in funcs.asp.
now, I use top.inc and bot.inc for header and footer for my pages.
I included func.asp in top.inc and it works fine - all the pages who has top.inc included with them are working fine.
the problem is with pages that directly includes funcs.asp
I get this error:
Microsoft VBScript compilation error '800a0411'
Name redefined
/board/web/funcs.asp, line 2
dim conn
----^
what could i do?