Visual Basic - Error: Column 'CompraId' does not belong to table

Life is soft - evento anual de software empresarial
 
Vista:

Error: Column 'CompraId' does not belong to table

Publicado por Fustavo Sanchez (3 intervenciones) el 04/06/2009 20:51:12
Hola estoy recibiendo este error System.ArgumentException was caught Message="Column 'CompraId' does not belong to table data."

Esta funcion envia archivos via bluetooth usando BTFramework 6 en vb.net, pero el error me da un excepcion que me cancela la conexion bluetooth y no me envia los archivos completos

Private Sub EnviarContenido()
BFObjectPushClientX.OpenDevice()
If BFObjectPushClientX.Active Then
Try
For Each row As DataRow In _archivos.Tables(0).Rows
BFObjectPushClientX.Put(My.Application.Info.DirectoryPath & "" & K_FOLDER_CONTENIDO_TMP & "" & row("Archivo"))

**AQUI** _ws.ReportarEntregaBluetooth(PasswordDeConexion(), row("CompraId"), row("ItemId"), My.Settings.NombreUsuario)

Next
Catch ex As Exception
Dim oErr As New cError(ex)
_frmMsg = New frmMensaje("Disculpe, el contenido no pudo ser entregado en su totalidad. Por favor, intentelo nuevamente. En caso de problemas, intente seleccionar sólo un item o contenido a la vez.", eTipoMensaje.Info, False)
_frmMsg.ShowDialog()
End Try
Else
_frmMsg = New frmMensaje("Disculpe, no se ha podido establecer comunicación con el dispositivo. Por favor, intentelo nuevamente.", eTipoMensaje.Info, False)
_frmMsg.ShowDialog()
End If
BFObjectPushClientX.Close()
End Sub

End Class

Este es el codigo de la funcion que esta en el web service que hace el llamado a un stored procedure en la base de datos

Public Sub ReportarEntregaBluetooth(ByVal Password As String, ByVal CompraId As Integer, ByVal ItemId As Integer, ByVal NombreUsuario As String)
If Not ConexionValida(Password, eEncrypt.eDesencriptar) Then
Exit Sub
End If

Dim objRegistrar As New BDInter2005.AdministraObjetos()
Dim atributos(3) As String
Dim datos(3) As Object
Dim parametros(3) As String

atributos(1) = "CompraId"
datos(1) = CompraId
parametros(1) = "entero"

atributos(2) = "ItemId"
datos(2) = ItemId
parametros(2) = "entero"

atributos(3) = "NombreUsuario"
datos(3) = NombreUsuario
parametros(3) = "string"

objRegistrar.StringConexion = ConfigurationManager.ConnectionStrings.Item("StringConec").ConnectionString.ToString()
objRegistrar.RegistrarObjeto("dbo.spReportarEntregaBluetooth", atributos, datos, parametros)
objRegistrar = Nothing
End Sub
End Class
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