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 parametro 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)

Problems with ADO .NET
Kuntal Loya - MSFT
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
jmw