Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/03/2003, 13:33
gerllo
Invitado
 
Mensajes: n/a
Puntos:
Problema con procedimientos..?

oigan tengo 2 archivos.. uno de configuracion y otro donde hago una consulta en asp. lo raro es que hasta ahora me ha dado problemas..

el primer archivo library.asp el code es:
<%
sub AbrirDb()
on error resume next
dim CnnVt
set CnnVt=server.createobject("adodb.connection")
' SQL Server local or remote IP in SERVER=
' connString = "Driver={SQL Server};UID=comersus;password=123456;DATABASE=come rsus;SERVER=127.0.0.1"
connString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=D:\On-Line\Ventura\db\VenturaData.mdb"
CnnVt.Open ConnString
if err.number <> 0 then
response.write "Error while opening DB:"&Err.Description& "<br><br><b>Common solutions</b><br><br>1. Check that you haven't change default database path and name <br>2. Check that your web server has Access 97 or 2000 ODBC installed <br>3. Check that you have read, modify and delete permissions over database folder and database file <br>4. Open your database with Access program and select Repair Database option <br>5. Select other connection method like other connection string or DSN"
end if
end sub

'Products in Cateogory Chossen
sub Categories()
strSQl = "SELECT PrdtsMainCatId, PrdtsMainCat.PrdtsMainCatImgsId PrdtsMainCatNm, PrdtsMainCatImgs " &_
" FROM PrdtsMainCat INNER JOIN PrdtsMainCatImgs " &_
" ON PrdtsMainCat.PrdtsMainCatImgsId = PrdtsMainCatImgs.PrdtsMainCatImgsId"

Set rsCats= CnnVt.Execute(strSQL )
'response.write "<br><br>"
response.write "<table align='center'>"
if rsCats.eof then
Response.Write "<tr>"
Response.write "<td colspan=3 align=center height='30' align='center' valign='middle'>"
Response.write "Lo sentimos actualmente, no Existen Categorias Inscritas<br><br><br>Presione el Boton Residencial para Escoger otra Opcion</td>"
Response.Write "</tr>"
else
arcats = rsCats.GetRows
rsCats.Close
Set rsCats = Nothing
fin = UBound(arcats, 2)
For i = 0 To fin %>
<tr><td><a href="../default.asp?cat_id=<%=arcats(0, i)%>">
<img src="images/connectors/<%=arcats(2, i)%>" height="200" width="200" border="0"><br>
<font face=Verdana size=2><%=arcats(1, i) %></font></a></td>
<% response.write "<td width=70></td>"
if i<fin then
i= i+1 %>
<td><a href="../default.asp?cat_id=<%=arcats(0, i)%>">
<img src="images/connectors/<%=arcats(2, i)%>" height="200" width="200" border="0"><br>
<font face=Verdana size=2><%=arcats(1, i) %></font></a></td>
<% end if
response.write "</font></tr>"
response.write "<tr>"
Next
end if
response.write "</table>"
end sub

sub closeDB()
on error resume next
CnnVt.close
set CnnVt = nothing
end sub

%>

El segundo onde hago la consulta.. pues default.asp
<!-- #include file="library.asp" -->

<%
'on error resume next
call abrirDB()
call Categories()
%>


lo que me da de error es...

Error de Microsoft VBScript en tiempo de ejecución error '800a01a8'

Se requiere un objeto: 'CnnVt'

../library.asp, line 21

y la linea 21 es... Set rsCats= CnnVt.Execute(strSQL )


Que sera alguno puede ayudarme.. ya me jale los pelos un gran rato..
Mi S..O es Windows 2000 Server

Atentamente

Gerllo