BLOB fields trouble

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • HABJAN ®iga

    BLOB fields trouble

    I'am trying to insert a record with a blob field in it:


    create table KC113DELO.Test1 (
    ID INT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1,
    NO CACHE ),
    TTEST VARCHAR(30),
    TBLOB BLOB(50000) NOT LOGGED NOT COMPACT
    ) DATA CAPTURE NONE IN USERSPACE1


    vb.net code:
    Dim datB As New ADODB.Connectio n
    datB.Open(" DSN=Kc113db2", "db2admin", "db2admin")

    Dim recA As New ADODB.Recordset
    recA.Open(" select id,tTest,tblob from kc113delo.test1 ", datB,
    ADODB.CursorTyp eEnum.adOpenKey set, ADODB.LockTypeE num.adLockPessi mistic)
    With recA
    .AddNew()
    .Fields("tTest" ).Value = "asd" & Date.Now.Today
    .Fields("tBlob" ).AppendChunk(" this is a test")
    .Update()
    End With


    I get (on update):
    An unhandled exception of type 'System.Runtime .InteropService s.COMException'
    occurred in TestChunk.exe
    Additional information: [IBM][CLI Driver] CLI0102E Invalid conversion.
    SQLSTATE=07006

    I tryed insering byte array, string: same error

    --- using vb.net on framework 1.1, IBM DB2 7.2, ODBC connection

    thanks for any advice
    best re,
    habix



Working...