Ver Mensaje Individual
  #4 (permalink)  
Antiguo 05/11/2007, 09:12
Avatar de JuanRAPerez
JuanRAPerez
Colaborador
 
Fecha de Ingreso: octubre-2003
Mensajes: 2.393
Antigüedad: 21 años, 6 meses
Puntos: 27
Re: problema con includes

conector.asp
Cita:
<%
dim llenguatge, oConn
lenguaje= request.QueryString("ln")

if lenguaje = "" then lenguaje = "ES" end If

if idioma = "ES" then
BasePath = "basesdedatos/ESPANOL.mdb"
end if
BasePath = "basesdedatos/OTROIDIOMA.mdb"
dim

Sub AbrirConexion
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("& BasePath &"))
end Sub

sub CerrarConexion
oConn.Close
set oConn = nothing
end sub
%>
luego en TU ASP solo haces un include y le das al inicio
Cita:
<%AbrirConexion%>
y al final de tu pagina
Cita:
<%CerrarConexion%>

suerte
__________________
JuanRa Pérez
San Salvador, El Salvador