Bytea datatype insert to PostgreSQL DBase

From: "SUFFIAN RAMLI" <yanz1927(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Bytea datatype insert to PostgreSQL DBase
Date: 2002-11-26 07:53:15
Message-ID: F1254iBmDJ9CP3eBOCm000122d7@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).
PostgreSQL ODBC driver 7.2

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 help me.

Rgds
Suffian Ramli

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail

Browse pgsql-general by date

  From Date Subject
Next Message Christoph Dalitz 2002-11-26 08:43:32 ALTER TRIGGER DISABLE/ENABLE
Previous Message Mike Mascari 2002-11-26 07:35:02 Re: Migrating DAta from MSSQL to postgre