Giving write a byte array seems a little fishy to me because it needs a
variant (I'm not sure how VB lets you get away with it).  Try declaring a
variant and setting it equal to bArray and passing the variant to the write
method.
Good luck,
Mike

P.S.
This post really belongs in the conduit developer forum.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf
> Of Ricardo
> Beltr�o
> Sent: Monday, July 22, 2002 8:17 AM
> To: Palm Developer Forum
> Subject: problem with COM CDK 4.03
>
>
> The following Sub stopped working after I upgraded to CDK 4.03:
> -------------------------------------------------------------------
> Sub SetFlag()
> Dim bArray(0 To 1) As Byte
>
> Set Adapter =3D DbQuery.OpenRecordDatabase
> ("CEPedSyn", "PDDirect.PDRecordAdapter")
> If Adapter.RecordCount =3D 0 Then
>     UniqueId =3D vbEmpty
> Else
>     Adapter.IterationIndex =3D 0
>     Data =3D Adapter.ReadNext(Index, UniqueId, Category, Attributes)
> End If
> IntegerToBlob bArray, 0, 1
> Adapter.Write UniqueId, 0, 0, bArray '<---ERROR OCCURS HERE!!!
> Set Adapter =3D Nothing
>
> End Sub
> ----------------------------------------------------------------
> Public Sub IntegerToBlob(ByRef vData As Variant, Offset As Long,
> InData As Integer)
> Dim ByteArr2 As tByteArr2
> Dim MyInteger As tInteger
> Dim Counter As Integer
>   MyInteger.VarInteger =3D InData
>   LSet ByteArr2 =3D MyInteger
>   For Counter =3D 0 To 1
>     vData(Offset + Counter) =3D ByteArr2.ByteArr(1 - Counter)
>   Next Counter
> End Sub
> -----------------------------------------------------------------
>
> When executing the Adapter.Write method, I receive this message from
> windows:
>
> Application Error : the instruction at "0x00000000" made reference to
> memory at "0x00000000". Memory could not be read.
>
> And this message from VB:
> Run-time error '10':
> This array is fixed or temporarily locked.
>
> I=B4m syncing with POSE 3.5, emulating a Palm Vx.
>
>
> ___________________________
> Ricardo Beltr=E3o
> Recife - PE
> Brazil
>
>
>
> --
> For information on using the Palm Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/support/forums/
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to