
18/02/2005, 16:25
|
| | Fecha de Ingreso: febrero-2005 Ubicación: Peru
Mensajes: 3
Antigüedad: 20 años, 2 meses Puntos: 0 | |
Hola, tengo un problema con ASP y Componentes Mi Codigo ASP llama a un componente de la siguiente manera
<%
NOmbre =request("NOmbre ")
set rstbusca=CreateObject("adodb.recordset")
Dim Obj
Set Obj = createObject("ConsultaPlaca.ClsConsultaplaca")
Set rstbusca = Obj.ConsultaPlaca(NOmbre ) 'Aqui esta el error
Set obj = Nothing
If NOT rstBusca.eof Then .....
%>
Este es el mensaje del Error : "La variable de tipo Object o la variable de bloque With no está establecida"
Y este es el codigo del componente
Public Function ConsultaNombre(ByVal NOmbre As String) As ADODB.Recordset
Dim KNOMBREMODULO As String
Dim CadenaConexion As String
Dim strSQL As String
Dim Conn As Connection
On Error GoTo ErrConsultaNombre
CadenaConexion = "Provider=SQLOLEDB;Password=123456;User ID=Usuarioweb;Initial Catalog=bdsistema;Data Source=server1"
KNOMBREMODULO = "Consulta por Placa"
strSQL = "spRd_NOmbre '" & NOmbre & "'"
Conn.ConnectionString = CadenaConexion
Conn.Open
Set ConsultaNombre= Conn.Execute(strSQL)
Conn.Close
Set Conn = Nothing
Exit Function
ErrConsultaNombre:
Conn.Close
Set Conn = Nothing
Err.Raise vbObject + 500, KNOMBREMODULO, Err.Description
End Function |