Conexion Base de datos OLE DB

10/12/2004 - 23:55 por Omar | Informe spam
estoy empezando en ASP y realice una pagina que genera una consulta a una
base de datos pero cuando la corro me da el siguiente error Provider cannot
be found. It may not be properly installed es una base de datos Access 2000 y
unas tablas Fox 6. Les adjunto el codigo de la pagina.

Gracias si pueden colaborarme.


<%
dim Conec,con,rs,rs2,rs3,rs4,rs5,rs6,rs7

Set Conec = Server.CreateObject("ADODB.Connection")
Conec.Open "Provider=VfpOleDB.1;Data
source=C:\Inetpub\wwwroot\Clientes\Database\Intracarga.dbc"

Set Con = Server.CreateObject("ADODB.Connection")
Con.Open "Provider = Microsoft.Jet.OleDB.4.0;Data
source=C:\Inetpub\wwwroot\Clientes\Database\Bodegas.mdb"

set rs=Server.createobject("ADODB.Recordset")
set rs2=Server.createobject("ADODB.Recordset")
set rs3=Server.createobject("ADODB.Recordset")
set rs4=Server.createobject("ADODB.Recordset")
set rs5=Server.createobject("ADODB.Recordset")
set rs6=Server.createobject("ADODB.Recordset")
set rs7=Server.createobject("ADODB.Recordset")

query="select * from bodegas order by nombre asc"
rs.open query,Con
%>
<html>
<head>
<title>.: INTRACARGA S.A. - CLIENTES :.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- Fireworks MX Dreamweaver MX target. Created Tue Nov 09 09:36:26
GMT-0500 (Hora est. del Pacífico de SA) 2004-->
<link href="estilos.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<table width="777" border="0" align="center" cellpadding="0" cellspacing="0">
<!-- fwtable fwsrc="CLIENTS.PNG" fwbase="CLIENTS.jpg"
fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
<tr>
<td><img src="images/spacer.gif" width="335" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="5" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="69" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="16" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="7" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="73" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="12" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="11" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="74" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="23" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="8" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="10" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="56" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="36" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="41" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0"
alt=""></td>
</tr>
<tr>
<td colspan="16"><img name="CLIENTS_r1_c1"
src="images/CLIENTS_r1_c1.jpg" width="777" height="126" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="1" height="126" border="0"
alt=""></td>
</tr>
<tr>
<td rowspan="2" colspan="2"><img name="CLIENTS_r2_c1"
src="images/CLIENTS_r2_c1.jpg" width="340" height="23" border="0" alt=""></td>
<td colspan="2"><a href="../index.html"><img src="images/HOMEVERDE.gif"
width="85" height="19" border="0"></a></td>
<td rowspan="2" colspan="2"><img name="CLIENTS_r2_c5"
src="images/CLIENTS_r2_c5.jpg" width="8" height="23" border="0" alt=""></td>
<td colspan="2"><a href="EntSal.asp"><img name="CLIENTS_r2_c7"
src="images/CLIENTS_r2_c7.jpg" width="85" height="19" border="0"
alt=""></a></td>
<td rowspan="2"><img name="CLIENTS_r2_c9" src="images/CLIENTS_r2_c9.jpg"
width="11" height="23" border="0" alt=""></td>
<td colspan="3"><a href="Despachos.asp"><img name="CLIENTS_r2_c10"
src="images/CLIENTS_r2_c10.jpg" width="105" height="19" border="0"
alt=""></a></td>
<td rowspan="2"><img name="CLIENTS_r2_c13"
src="images/CLIENTS_r2_c13.jpg" width="10" height="23" border="0" alt=""></td>
<td colspan="2"><img name="CLIENTS_r2_c14"
src="images/CLIENTS_r2_c14.jpg" width="92" height="19" border="0" alt=""></td>
<td rowspan="2"><img name="CLIENTS_r2_c16"
src="images/CLIENTS_r2_c16.jpg" width="41" height="23" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="1" height="19" border="0"
alt=""></td>
</tr>
<tr>
<td colspan="2"><img name="CLIENTS_r3_c3" src="images/CLIENTS_r3_c3.jpg"
width="85" height="4" border="0" alt=""></td>
<td colspan="2"><img name="CLIENTS_r3_c7" src="images/CLIENTS_r3_c7.jpg"
width="85" height="4" border="0" alt=""></td>
<td colspan="3"><img name="CLIENTS_r3_c10"
src="images/CLIENTS_r3_c10.jpg" width="105" height="4" border="0" alt=""></td>
<td colspan="2"><img name="CLIENTS_r3_c14"
src="images/CLIENTS_r3_c14.jpg" width="92" height="4" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="1" height="4" border="0"
alt=""></td>
</tr>
<tr>
<td colspan="16" valign="top"><table width="95%" border="1"
align="center" cellpadding="0" cellspacing="1" bordercolor="#CCCCCC">
<tr>
<td><table width="97%" border="0" align="center" cellpadding="0"
cellspacing="2">
<tr>
<td align="center" valign="middle"><div align="right">
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td height="19" colspan="2" valign="top"><hr
width="98%" size="1"></td>
</tr>
<tr>
<td width="65%" height="91" valign="top"> <form
name="form1" method="post" action="search_bodegas.asp">
<table width="71%" border="1" align="center"
cellpadding="3" cellspacing="2" bordercolor="#CCCCCC">
<tr bgcolor="#ebebeb">
<td colspan="2" class="textonegrita">Seleccione
la Bodega para la busqueda:</td>
</tr>
<tr>
<td colspan="2"><select name="codbod" class="forms" id="select2">
<%Do Until rs.EOF%>
<option
value="<%=rs("codsuc")%>"><%=ucase(rs("nombre"))%></option>
<% rs.MoveNext
Loop
rs.close
%>
</select></td>
</tr>
<tr bgcolor="#ebebeb">
<td colspan="2"> <table width="100%" border="1" align="center"
cellpadding="2" cellspacing="2" bordercolor="#FFFFFF">
<tr bgcolor="#FFFFFF">
<td width="50%" height="25"><span class="textonegrita">Periodo
<input name="mes1" type="text" class="forms" id="mes1" size="2" maxlength="2">
</span></td>
<td width="50%"><input name="tipo"
type="radio" class="forms" value="111" checked>
<span class="textosalmon">Entrada</span> <span class="textonegrita">/</span>
<input name="tipo" type="radio" class="forms" value="011">

<span class="textosalmon">Salida
</span></td>
</tr>
</table></td>
</tr>
<tr>
<td width="50%"><div align="center">
<input name="Submit" type="submit" class="forms" value="Realizar Busqueda
Ahora" style="cursor:hand">
</div></td>
<td width="50%"><div align="center">
<input name="Submit2" type="reset" class="forms" value="Borrar Campos"
style="cursor:hand">
</div></td>
</tr>
</table>
</form></td>
<td width="35%" valign="top"> <div
align="center"><img src="images/bodegas.jpg" width="241" height="84">
</div></td>
</tr>
<tr>
<td height="19" colspan="2" valign="top"><hr
width="98%" size="1"></td>
</tr>
</table>
</div></td>
</tr>
</table></td>
</tr>
</table>

</td>
<td><img src="images/spacer.gif" width="1" height="207" border="0"
alt=""></td>
</tr>
<tr>
<td><img name="CLIENTS_r5_c1" src="images/CLIENTS_r5_c1.jpg" width="335"
height="28" border="0" alt=""></td>
<td colspan="2"><a href="../index.html"><img name="CLIENTS_r5_c2"
src="images/CLIENTS_r5_c2.jpg" width="74" height="28" border="0"
alt=""></a></td>
<td colspan="2"><img name="CLIENTS_r5_c4" src="images/CLIENTS_r5_c4.jpg"
width="23" height="28" border="0" alt=""></td>
<td colspan="2"><a href="EntSal.asp"><img name="CLIENTS_r5_c6"
src="images/CLIENTS_r5_c6.jpg" width="74" height="28" border="0"
alt=""></a></td>
<td colspan="2"><img name="CLIENTS_r5_c8" src="images/CLIENTS_r5_c8.jpg"
width="23" height="28" border="0" alt=""></td>
<td><a href="Despachos.asp"><img name="CLIENTS_r5_c10"
src="images/CLIENTS_r5_c10.jpg" width="74" height="28" border="0"
alt=""></a></td>
<td><img name="CLIENTS_r5_c11" src="images/CLIENTS_r5_c11.jpg"
width="23" height="28" border="0" alt=""></td>
<td colspan="3"><img name="CLIENTS_r5_c12"
src="images/CLIENTS_r5_c12.jpg" width="74" height="28" border="0" alt=""></td>
<td colspan="2"><img name="CLIENTS_r5_c15"
src="images/CLIENTS_r5_c15.jpg" width="77" height="28" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="1" height="28" border="0"
alt=""></td>
</tr>
</table>
</body>
</html>
 

Leer las respuestas

#1 pablo crosio
11/12/2004 - 04:23 | Informe spam
1 - ¿donde especificamente te da el error?

2 - ¿verificaste que realmente estan los proveedores oledb instalados en tu
pc? el de VFP y el Access

salu2!!

pablo

"Omar" escribió:

estoy empezando en ASP y realice una pagina que genera una consulta a una
base de datos pero cuando la corro me da el siguiente error Provider cannot
be found. It may not be properly installed es una base de datos Access 2000 y
unas tablas Fox 6. Les adjunto el codigo de la pagina.

Gracias si pueden colaborarme.


<%
dim Conec,con,rs,rs2,rs3,rs4,rs5,rs6,rs7

Set Conec = Server.CreateObject("ADODB.Connection")
Conec.Open "Provider=VfpOleDB.1;Data
source=C:\Inetpub\wwwroot\Clientes\Database\Intracarga.dbc"

Set Con = Server.CreateObject("ADODB.Connection")
Con.Open "Provider = Microsoft.Jet.OleDB.4.0;Data
source=C:\Inetpub\wwwroot\Clientes\Database\Bodegas.mdb"

set rs=Server.createobject("ADODB.Recordset")
set rs2=Server.createobject("ADODB.Recordset")
set rs3=Server.createobject("ADODB.Recordset")
set rs4=Server.createobject("ADODB.Recordset")
set rs5=Server.createobject("ADODB.Recordset")
set rs6=Server.createobject("ADODB.Recordset")
set rs7=Server.createobject("ADODB.Recordset")

query="select * from bodegas order by nombre asc"
rs.open query,Con
%>
<html>
<head>
<title>.: INTRACARGA S.A. - CLIENTES :.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- Fireworks MX Dreamweaver MX target. Created Tue Nov 09 09:36:26
GMT-0500 (Hora est. del Pacífico de SA) 2004-->
<link href="estilos.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<table width="777" border="0" align="center" cellpadding="0" cellspacing="0">
<!-- fwtable fwsrc="CLIENTS.PNG" fwbase="CLIENTS.jpg"
fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
<tr>
<td><img src="images/spacer.gif" width="335" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="5" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="69" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="16" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="7" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="73" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="12" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="11" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="74" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="23" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="8" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="10" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="56" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="36" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="41" height="1" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0"
alt=""></td>
</tr>
<tr>
<td colspan="16"><img name="CLIENTS_r1_c1"
src="images/CLIENTS_r1_c1.jpg" width="777" height="126" border="0"
alt=""></td>
<td><img src="images/spacer.gif" width="1" height="126" border="0"
alt=""></td>
</tr>
<tr>
<td rowspan="2" colspan="2"><img name="CLIENTS_r2_c1"
src="images/CLIENTS_r2_c1.jpg" width="340" height="23" border="0" alt=""></td>
<td colspan="2"><a href="../index.html"><img src="images/HOMEVERDE.gif"
width="85" height="19" border="0"></a></td>
<td rowspan="2" colspan="2"><img name="CLIENTS_r2_c5"
src="images/CLIENTS_r2_c5.jpg" width="8" height="23" border="0" alt=""></td>
<td colspan="2"><a href="EntSal.asp"><img name="CLIENTS_r2_c7"
src="images/CLIENTS_r2_c7.jpg" width="85" height="19" border="0"
alt=""></a></td>
<td rowspan="2"><img name="CLIENTS_r2_c9" src="images/CLIENTS_r2_c9.jpg"
width="11" height="23" border="0" alt=""></td>
<td colspan="3"><a href="Despachos.asp"><img name="CLIENTS_r2_c10"
src="images/CLIENTS_r2_c10.jpg" width="105" height="19" border="0"
alt=""></a></td>
<td rowspan="2"><img name="CLIENTS_r2_c13"
src="images/CLIENTS_r2_c13.jpg" width="10" height="23" border="0" alt=""></td>
<td colspan="2"><img name="CLIENTS_r2_c14"
src="images/CLIENTS_r2_c14.jpg" width="92" height="19" border="0" alt=""></td>
<td rowspan="2"><img name="CLIENTS_r2_c16"
src="images/CLIENTS_r2_c16.jpg" width="41" height="23" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="1" height="19" border="0"
alt=""></td>
</tr>
<tr>
<td colspan="2"><img name="CLIENTS_r3_c3" src="images/CLIENTS_r3_c3.jpg"
width="85" height="4" border="0" alt=""></td>
<td colspan="2"><img name="CLIENTS_r3_c7" src="images/CLIENTS_r3_c7.jpg"
width="85" height="4" border="0" alt=""></td>
<td colspan="3"><img name="CLIENTS_r3_c10"
src="images/CLIENTS_r3_c10.jpg" width="105" height="4" border="0" alt=""></td>
<td colspan="2"><img name="CLIENTS_r3_c14"
src="images/CLIENTS_r3_c14.jpg" width="92" height="4" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="1" height="4" border="0"
alt=""></td>
</tr>
<tr>
<td colspan="16" valign="top"><table width="95%" border="1"
align="center" cellpadding="0" cellspacing="1" bordercolor="#CCCCCC">
<tr>
<td><table width="97%" border="0" align="center" cellpadding="0"
cellspacing="2">
<tr>
<td align="center" valign="middle"><div align="right">
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td height="19" colspan="2" valign="top"><hr
width="98%" size="1"></td>
</tr>
<tr>
<td width="65%" height="91" valign="top"> <form
name="form1" method="post" action="search_bodegas.asp">
<table width="71%" border="1" align="center"
cellpadding="3" cellspacing="2" bordercolor="#CCCCCC">
<tr bgcolor="#ebebeb">
<td colspan="2" class="textonegrita">Seleccione
la Bodega para la busqueda:</td>
</tr>
<tr>
<td colspan="2"><select name="codbod" class="forms" id="select2">
<%Do Until rs.EOF%>
<option
value="<%=rs("codsuc")%>"><%=ucase(rs("nombre"))%></option>
<% rs.MoveNext
Loop
rs.close
%>
</select></td>
</tr>
<tr bgcolor="#ebebeb">
<td colspan="2"> <table width="100%" border="1" align="center"
cellpadding="2" cellspacing="2" bordercolor="#FFFFFF">
<tr bgcolor="#FFFFFF">
<td width="50%" height="25"><span class="textonegrita">Periodo
<input name="mes1" type="text" class="forms" id="mes1" size="2" maxlength="2">
</span></td>
<td width="50%"><input name="tipo"
type="radio" class="forms" value="111" checked>
<span class="textosalmon">Entrada</span> <span class="textonegrita">/</span>
<input name="tipo" type="radio" class="forms" value="011">

<span class="textosalmon">Salida
</span></td>
</tr>
</table></td>
</tr>
<tr>
<td width="50%"><div align="center">
<input name="Submit" type="submit" class="forms" value="Realizar Busqueda
Ahora" style="cursor:hand">
</div></td>
<td width="50%"><div align="center">
<input name="Submit2" type="reset" class="forms" value="Borrar Campos"
style="cursor:hand">
</div></td>
</tr>
</table>
</form></td>
<td width="35%" valign="top"> <div
align="center"><img src="images/bodegas.jpg" width="241" height="84">
</div></td>
</tr>
<tr>
<td height="19" colspan="2" valign="top"><hr
width="98%" size="1"></td>
</tr>
</table>
</div></td>
</tr>
</table></td>
</tr>
</table>

</td>
<td><img src="images/spacer.gif" width="1" height="207" border="0"
alt=""></td>
</tr>
<tr>
<td><img name="CLIENTS_r5_c1" src="images/CLIENTS_r5_c1.jpg" width="335"
height="28" border="0" alt=""></td>
<td colspan="2"><a href="../index.html"><img name="CLIENTS_r5_c2"
src="images/CLIENTS_r5_c2.jpg" width="74" height="28" border="0"
alt=""></a></td>
<td colspan="2"><img name="CLIENTS_r5_c4" src="images/CLIENTS_r5_c4.jpg"
width="23" height="28" border="0" alt=""></td>
<td colspan="2"><a href="EntSal.asp"><img name="CLIENTS_r5_c6"
src="images/CLIENTS_r5_c6.jpg" width="74" height="28" border="0"
alt=""></a></td>
<td colspan="2"><img name="CLIENTS_r5_c8" src="images/CLIENTS_r5_c8.jpg"
width="23" height="28" border="0" alt=""></td>
<td><a href="Despachos.asp"><img name="CLIENTS_r5_c10"
src="images/CLIENTS_r5_c10.jpg" width="74" height="28" border="0"
alt=""></a></td>
<td><img name="CLIENTS_r5_c11" src="images/CLIENTS_r5_c11.jpg"
width="23" height="28" border="0" alt=""></td>
<td colspan="3"><img name="CLIENTS_r5_c12"
src="images/CLIENTS_r5_c12.jpg" width="74" height="28" border="0" alt=""></td>
<td colspan="2"><img name="CLIENTS_r5_c15"
src="images/CLIENTS_r5_c15.jpg" width="77" height="28" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="1" height="28" border="0"
alt=""></td>
</tr>
</table>
</body>
</html>


Preguntas similares