Problems with ADO .NET


  • Hi, I'm trying to pass a LongVarBinary data type parameter to a dynamic SQL,
    but it gives me a Syntax error.
    That is in order to insert a blob data type under Informix DataBase.

    The code that I'm using is the following:


                     dim intValReturn as integer = 0
                     dim Table as string = "st_example"
                   dim fieldblob as string = "fieldblob1"

                    strQuery = "UPDATE " & Table & " SET " & FieldBlob & " = @parambyte"

                    Dim spParamByte As OleDbParameter  'Crea parámetro Byte

                    Dim cmmUpdate As New OleDbCommand(strQuery, oCnx)
                    cmmUpdate.CommandType = CommandType.Text

                    spParamByte = cmmUpdate.Parameters.Add("@parambyte",  _
                    spParamByte.Value = System.DBNull.Value 'buffer
                    spParamByte.Direction = ParameterDirection.Input

                     intValReturn = cmmUpdate.ExecuteNonQuery() '<--In this line ocurrs 
                                                                                     '  the syntax error.

    Is possible to do that in Informix DB?



    Friday, May 06, 2005 6:11 PM


All replies