consulta de asp
Publicado por waldyr (3 intervenciones) el 03/01/2006 23:45:45
Buenas tardes. un favor este codigo que he dijitado me deberia poder realizar conexion con una bd de acces y cargar datos de una tabla.pero no pasa nada.favor agradeceria me den uan manito, ya que estoy iniciandome en este tema de asp, y si me pueden recomendar alguan direccion para ver + afondo este tema.gracias
<html>
<head>
<title>Busqueda </title>
</head>
<body>
<%
On Error Resume Next
Set Conexion = CreateObject("ADODB.Connection")
conexion.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=H:\Archivos de programa\Microsoft Office\Office10\Samples\bdejemplo4.mdb;Persist Security Info=False"
StrSQL="select URL from vinculos where Id = " & Request.QueryString
set miconexion = Conexion.Execute(StrSQL)
If Err.Description <>"" then
response.write "<b>Error en Base de datos:" & Err.Description & " </b>"
Else
response.Redirect miConexion("URL")
End If
set miconexion=Nothing
set conexion = Nothing
%>
<hr>
<center><font face="Verdana" size="1" color="#0000FF">Buscador Web 2005© todos lo derechos reservados.</font></center>
</body>
</html>
<html>
<head>
<title>Busqueda </title>
</head>
<body>
<%
On Error Resume Next
Set Conexion = CreateObject("ADODB.Connection")
conexion.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=H:\Archivos de programa\Microsoft Office\Office10\Samples\bdejemplo4.mdb;Persist Security Info=False"
StrSQL="select URL from vinculos where Id = " & Request.QueryString
set miconexion = Conexion.Execute(StrSQL)
If Err.Description <>"" then
response.write "<b>Error en Base de datos:" & Err.Description & " </b>"
Else
response.Redirect miConexion("URL")
End If
set miconexion=Nothing
set conexion = Nothing
%>
<hr>
<center><font face="Verdana" size="1" color="#0000FF">Buscador Web 2005© todos lo derechos reservados.</font></center>
</body>
</html>
Valora esta pregunta


0