%
Response.Clear()
Response.Buffer=false
%>
<% mysql = true %>
Fabricantes DECO Office Design. El Diseño de Oficinas a su alcance. Software 3D para el Mundo del Mueble Oficina.
Fabricante:
Catálogos:
<%
dim cn
dim rs, rs2, rec, mensajeError, nombrefab
set cn = Server.CreateObject("adodb.connection")
set rs = Server.CreateObject("adodb.recordset")
set rs2 = Server.CreateObject("adodb.recordset")
if mysql then
cn.ConnectionString = conexion
else
cn.ConnectionString = "dsn=acaes.com.data"
end if
'cn.ConnectionString="Driver={Microsoft Access Driver (*.mdb)}; DBQ=C:\Documents and Settings\elara.ACA\Mis documentos\Web\acaes\Data\Acaweb.mdb"
cn.Open
rs.open "SELECT DISTINCT FABRICANTES.DescListado, FABRICANTES.Fichero_Gif, CATALOGOS.DESCRIPCION FROM CATALOGOS, FABRICANTES WHERE CATALOGOS.ID_FABRICANTE=FABRICANTES.CODIGO AND FABRICANTES.Activo=1 AND FABRICANTES.ActivoWeb=1 AND FABRICANTES.TIPO='OFICINA' AND CATALOGOS.VIGENTE=1 AND CATALOGOS.ActivoWeb=1 ORDER BY FABRICANTES.DescListado, CATALOGOS.DESCRIPCION", cn
nombrefab=""
Do While not rs.EOF
Fichero_Gif=rs("Fichero_Gif")
Telefono=""
Fax=""
EMAIL=""
URL=""
rs2.open "SELECT DISTINCT Id_NC.Telefono, Id_NC.Fax, Id_NC.EMAIL, Id_NC.URL FROM Id_NC, FABRICANTES WHERE Id_NC.Id=FABRICANTES.ID_FAB AND FABRICANTES.DescListado='" & rs("DescListado") & "'",cn
if not rs2.eof then
if not isnull(rs2("Telefono")) then
Telefono=rs2("Telefono")
else
Telefono=""
end if
if not isnull(rs2("Fax")) then
Fax=rs2("Fax")
else
Fax=""
end if
if not isnull(rs2("EMAIL")) then
EMAIL=rs2("EMAIL")
else
EMAIL=""
end if
if not isnull(rs2("URL")) then
URL=rs2("URL")
else
URL=""
end if
end if
rs2.close
nombrefab=rs("DescListado")
%>
<% check = 0
'Cierro todo, incluso en el Response, si el usuario se ha ido de la página, para que así no se siga ejecutando la consulta.
if not Response.IsClientConnected then
rs.close
rs2.close
cn.close
Response.End
end if
while check = 0 and not rs.eof
if nombrefab = rs("DescListado") then %>
<%=rs("DESCRIPCION")%>
<% rs.movenext
else
check=1
end if
wend %>
<%
loop
rs.close
cn.close
%>
Catálogos Genéricos
El programa incluye siempre una colección de catálogos genéricos: