Hola compis, srá o no una tontería pero llevo toda la mañana con un error de TIPOS. Me dice que estos no coinciden os pego le codigo (sorry por las tabulaciones):
ASP
IDPeriodoSuscripcion = Request.Form("txtIdPeriodoSuscripcion")
IDSuscripcion = Request.Form("txtIdSuscripcion")
TipoSuscripcion = Request.Form("txtTipoSuscripcion")
Login = Request.Form("txtLogin")
NumDias = Request.Form("txtNumDias")
FHInicio = Request.Form("txtFHInicio")
If Len(Request.Form("chkActivo")) = 0 Then
Activo = "N"
Else
Activo = "S"
End If
oModSuscripcion.ModSuscripcion Session("IDRevista"), _
IDPeriodoSuscripcion, _
IDSuscripcion, _
TipoSuscripcion, _
Login, _
NumDias, _
FHInicio, _
Activo, _
DSError
If DsError <> "" Then HayErrorSistema(DsError)
.......
DLL:
Public Function ModSuscripcion(ByVal IDRevista As String, _
ByVal fIDPeriodoSuscripcion As Long, ByVal fIDSuscripcion As Long, _
ByVal fTipoSuscripcion As String, fLogin As String, _
ByVal fNumDias As Long, ByVal fFHInicio As String, _
ByVal fActivo As String, DSError As Variant) As ADODB.Recordset
Dim objContext As ObjectContext
Dim oConex As ADODB.Connection
Dim oCommand As ADODB.Command
Dim sSQL As String
DSError = ""
On Error GoTo Errores:
Set objContext = GetObjectContext()
sSQL = "UPDATE Suscripciones "
sSQL = sSQL & "SET IDPeriodoSuscripcion = '" & fIDPeriodoSuscripcion & "', "
sSQL = sSQL & "IDSuscripcion = '" & fIDSuscripcion & "', "
sSQL = sSQL & "TipoSuscripcion = '" & fTipoSuscripcion & "', "
sSQL = sSQL & "Login = '" & fLogin & "', "
sSQL = sSQL & "NumDias = '" & fNumDias & "', "
sSQL = sSQL & "FHInicio = '" & fFHInicio & "', "
sSQL = sSQL & "Activo = '" & fActivo & "' "
sSQL = sSQL & "WHERE Suscripciones.IDSuscripcion = '" & fIDSuscripcion & "' "
sSQL = sSQL & " AND Suscripciones.IDRevista = '" & IDRevista & "' "
Set oConex = New ADODB.Connection
oConex.Open cnxItaca
Set oCommand = New ADODB.Command
oCommand.CommandText = sSQL
oCommand.CommandType = adCmdText
oCommand.ActiveConnection = oConex
oCommand.Execute
If Not oConex Is Nothing Then
oConex.Close
Set oConex = Nothing
End If
If Not objContext Is Nothing Then objContext.SetComplete
Salida:
If Not objContext Is Nothing Then Set objContext = Nothing
Exit Function
Errores:
DSError = "ERROR " & Err.Number & ". " & Err.Description & " (Método clsSuscriptores.ModificarSuscriptor)"
If Not objContext Is Nothing Then objContext.SetAbort
Resume Salida
End Function