Insert bytea type into PostgreSQL

From: "SUFFIAN RAMLI" <yanz1927(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Insert bytea type into PostgreSQL
Date: 2002-11-25 04:24:39
Message-ID: F46XfhCuIKe4YSeE1cH00008f13@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi,

I'm having a problem right now getting error message "Operation is not
allowed in this context" when I'm trying to INSERT/UPDATE to Database.
I'm using Visual Basic (ADO).

This is the code :

Dim rs As ADODB.Recordset
Dim varImg As Variant
Dim varChunk As Variant
Dim lngImgSize As Long
Dim lngImgOffset As Long

If Len(objMsgFormat.sImageData) > 0 Then ' String
varImg = objMsgFormat.byteArrayImage ' Convert String to Byte
lngImgSize = LenB(varImg)
lngImgOffset = 0
Do While lngImgOffset < lngImgSize
varChunk = LeftB(RightB(varImg, lngImgSize - lngImgOffset), 100)
rs!Signature.AppendChunk varChunk ' This line cause the error
lngImgOffset = lngImgOffset + 100
Loop
End If

Can somebody assistance me to sovled this.

Rgds
Suffian Ramli

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus

Browse pgsql-general by date

  From Date Subject
Next Message SZŰCS Gábor 2002-11-25 05:38:08 query visibility - trigger order - bug?
Previous Message Oliver Elphick 2002-11-25 02:47:57 Re: argh... can't cast varchar to int