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", _
OleDb.OleDbType.LongVarBinary)
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?

Thanks.

SugoiRam.
(sugoiram@hotmail.com)

[1220 byte] By [Sugoiram] at [2008-2-28]
# 1
Hi,
What's the syntax error?
Does your field allow null values? coz it seems that you are trying to initialize your field in to null...
Please post your question in the
.NET Framework Data Access and Storage

cheers,
Paul June A. Domag

PaulDomag at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
I have for the time being the same problem but perhaps in the end of the I will find the solution.
BA at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic General...