ASP - acceso a bd en access 2 en VBscript

 
Vista:

acceso a bd en access 2 en VBscript

Publicado por nahald (13 intervenciones) el 01/03/2001 09:43:11
tengo esta pagina de asp:
<%@LANGUAGE="VBSCRIPT"%>
<!doctype html public "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="3000 informática">
<title>Ficha Manejo Integrado de Plagas</title>
</head>
<body background="../../es-graficos/fondocam.gif" bgcolor="#FFFFFF">
<table width="100%" border="0">
<tr>
<td width="81%"><font color="#FF8000"><img
src="../../es-graficos/col3-2.gif" align="left" hspace="0" width="152"
height="31"></font></td>
<td width="19%"><a href="../../indexagri.html">Volver</a></td>
</tr>
</table>
<h2 align=center>Seleccione un CULTIVO para Elaborar el Informe<br>
</h2>
<%
Path=Server.MapPath("plagas.mdb")
set objConnexBD = Server.CreateObject("ADODB.Connection")
objConnexBD.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & Path
set rs = Server.CreateObjet("ADODB.RecordSet")
cadsql ="select * from cultivos"
rs.Open slq,objConnexBD
%>
<table>
<%
Do while not rs.EOF %>
<tr>
<td> <% =rs("codigo")%> </td>
<td> <% =rs("descripcion")%> </td>
</tr>

<% rs.MoveNext
Loop
rs.Close %>
</table>
</body>
</html>

Y me sale el error
ADODB.Connection error '800a0e7a' %0
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil

RE:acceso a bd en access 2 en VBscript

Publicado por Iñaki (112 intervenciones) el 01/03/2001 15:16:32
Hola Nahald, posiblemente el error esté en la indentificacion del proveedor(provider).
prueba a crear un DSN de sistema con el nombre "plagas", y abres la conexion de esta manera.
objConnexBD.open "plagas"
cadsql ="select * from cultivos"
rs.Open slq,objConnexBD

Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar