ERROR ALCONECTAR A BASE DE DATOS
Publicado por J@m (79 intervenciones) el 07/07/2010 03:12:22
Hola, estoy siguiendo tu manual de ejemplo de ASP, tengo el siguiente código, en mi equipo local funciona, pero lo subo al servidor y no muestra los datos, tampoco sale error. Me puedes ayudar?? Gracias.
Jairo
Cali - Colombia
<%@ Language="VBScript" %>
<html>
<head>
<title>Listado de la Base de Datos</title>
</head>
<body>
<p><big><big>Listado de Cuentas de Correo</big></big><br><br></p>
<%'CREAMOS LA TABLA CON LOS TITULOS%>
<div align="center"><center>
<table border="3" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="40%"><big>Nombre</big></td>
<td width="40%"><big>Apellido</big></td>
<td width="20%"><big>Email</big></td>
</tr>
<%'CONECTAMS CON LA BD%>
<%
Set ConexionBD=Server.CreateObject("ADOdb.Connection")
' Abrimos el objeto con el driver específico
' ConexionBD.Open "libros"
ConexionBD.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & "DBQ=" & Server.Mappath("/hola/Produccion2006.mdb")
Set RS = ConexionBD.Execute("select * from DISTRIBUIDORES")
%>
<%while not RS.EOF%>
<tr>
<td width="33%"><%=RS.Fields("NOMBRE")%></td>
<td width="33%"><%=RS.Fields("CEDU_NIT")%></td>
<td width="33%"><ahref="mailto:<%=RS.Fields("CORREO")%>"><%=RS.Fields("CORREO")%></a></td>
<%RS.movenext%>
</tr>
<%wend%>
</table>
</center></div>
</body>
</html>
Jairo
Cali - Colombia
<%@ Language="VBScript" %>
<html>
<head>
<title>Listado de la Base de Datos</title>
</head>
<body>
<p><big><big>Listado de Cuentas de Correo</big></big><br><br></p>
<%'CREAMOS LA TABLA CON LOS TITULOS%>
<div align="center"><center>
<table border="3" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="40%"><big>Nombre</big></td>
<td width="40%"><big>Apellido</big></td>
<td width="20%"><big>Email</big></td>
</tr>
<%'CONECTAMS CON LA BD%>
<%
Set ConexionBD=Server.CreateObject("ADOdb.Connection")
' Abrimos el objeto con el driver específico
' ConexionBD.Open "libros"
ConexionBD.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & "DBQ=" & Server.Mappath("/hola/Produccion2006.mdb")
Set RS = ConexionBD.Execute("select * from DISTRIBUIDORES")
%>
<%while not RS.EOF%>
<tr>
<td width="33%"><%=RS.Fields("NOMBRE")%></td>
<td width="33%"><%=RS.Fields("CEDU_NIT")%></td>
<td width="33%"><ahref="mailto:<%=RS.Fields("CORREO")%>"><%=RS.Fields("CORREO")%></a></td>
<%RS.movenext%>
</tr>
<%wend%>
</table>
</center></div>
</body>
</html>
Valora esta pregunta


0