Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Byte Array's

6 posts in Objects Last posting was on 2002-08-15 07:28:22.0Z
MattBell Posted on 2002-08-05 20:52:49.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: MattBell
Date: Mon, 5 Aug 2002 16:52:49 -0400
Subject: Byte Array's
Lines: 5
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_093AD5B2F4230AFF0072B30185256C0C.0072B30E85256C0C@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:1048
Article PK: 713606

Is there any way to create a byte array in PB?
Or to get any sort of binary level datatype?

Thanks,
Matt Bell


Bug Posted on 2002-08-05 21:58:43.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Bug" <fenterbug@hotmail.com>
Subject: Re: Byte Array's
Date: Mon, 5 Aug 2002 16:58:43 -0500
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
NNTP-Posting-Host: iaccess100.greyhound.com 206.66.2.100
Message-ID: <364_$yoO$zMPCHA.259@forums.sybase.com>
References: <364_093AD5B2F4230AFF0072B30185256C0C.0072B30E85256C0C@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:1047
Article PK: 713608

Not that I know of. The closest you could get is a boolean array. I don't
know what kind of grief you'll have trying to go from one datatype to the
other, though. Sounds like a good excuse to create a C wrapper...

Is there any specific reason why you can't use an integer array? Memory is
cheap... the client will probably have enough of it.

--
Jason 'Bug' Fenter
Best Dern Programmer Out There
fenterbug_at_hotmail_dot_com

<MattBell> wrote in message
news:093AD5B2F4230AFF0072B30185256C0C.0072B30E85256C0C@webforums...
> Is there any way to create a byte array in PB?
> Or to get any sort of binary level datatype?
>
> Thanks,
> Matt Bell


Matt_Bell Posted on 2002-08-06 18:52:44.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: Matt_Bell
Date: Tue, 6 Aug 2002 14:52:44 -0400
Subject: Re: Byte Array's
Lines: 9
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_A529900308496F540067B46085256C0D.007D13CD85256C0C@webforums>
References: <364_093AD5B2F4230AFF0072B30185256C0C.0072B30E85256C0C@webforums> <364_$yoO$zMPCHA.259@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:1043
Article PK: 713614

Well I'm trying to design an application that communicates via a OCX
control over TCP/IP to a piece of hardware that only talks in binary, SQL
Server can handle binary arrays, but powerbuilder can't.
What I've tried doing is converting the binary array to a varchar, which
give a set of symbols equating to the ascii values of the various bytes in
the array, which works pretty well except when the 0x00 byte shows up and
that just gets skipped.

I suppose something in C might be my best option at this point.


Tomaz Posted on 2002-08-15 07:28:22.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Tomaz" <tomaz.kralj@tpv-jc.si>
Subject: Re: Byte Array's
Date: Thu, 15 Aug 2002 09:28:22 +0200
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: gw.tpv-jc.si 195.246.17.133
Message-ID: <364_OQdJI#CRCHA.197@forums.sybase.com>
References: <364_093AD5B2F4230AFF0072B30185256C0C.0072B30E85256C0C@webforums> <364_$yoO$zMPCHA.259@forums.sybase.com> <364_A529900308496F540067B46085256C0D.007D13CD85256C0C@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:1016
Article PK: 713579

Hello,

I'am also looking for OCX to do something like this. Which OCH do you use?

Thanks

Tomaz

<Matt_Bell> wrote in message
news:A529900308496F540067B46085256C0D.007D13CD85256C0C@webforums...
> Well I'm trying to design an application that communicates via a OCX
> control over TCP/IP to a piece of hardware that only talks in binary, SQL
> Server can handle binary arrays, but powerbuilder can't.
> What I've tried doing is converting the binary array to a varchar, which
> give a set of symbols equating to the ascii values of the various bytes in
> the array, which works pretty well except when the 0x00 byte shows up and
> that just gets skipped.
>
> I suppose something in C might be my best option at this point.


Roy Kiesler [TeamSybase] Posted on 2002-08-06 20:29:21.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
Subject: Re: Byte Array's
Date: Tue, 6 Aug 2002 16:29:21 -0400
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 65.114.177.114
Message-ID: <364_ESP34mYPCHA.198@forums.sybase.com>
References: <364_093AD5B2F4230AFF0072B30185256C0C.0072B30E85256C0C@webforums> <364_$yoO$zMPCHA.259@forums.sybase.com> <364_A529900308496F540067B46085256C0D.007D13CD85256C0C@webforums>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:1042
Article PK: 713604

Have you tried a blob?

--
<hopethishelps/>
Roy Kiesler [TeamSybase]
Sybase Developer Network -- http://sdn.sybase.com

<Matt_Bell> wrote in message
news:A529900308496F540067B46085256C0D.007D13CD85256C0C@webforums...
> Well I'm trying to design an application that communicates via a OCX
> control over TCP/IP to a piece of hardware that only talks in binary, SQL
> Server can handle binary arrays, but powerbuilder can't.
> What I've tried doing is converting the binary array to a varchar, which
> give a set of symbols equating to the ascii values of the various bytes in
> the array, which works pretty well except when the 0x00 byte shows up and
> that just gets skipped.
>
> I suppose something in C might be my best option at this point.


MattBell Posted on 2002-08-07 16:26:07.0Z
Newsgroups: sybase.public.powerbuilder.objects
From: MattBell
Date: Wed, 7 Aug 2002 12:26:07 -0400
Subject: Re: Byte Array's
Lines: 6
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <364_0B79CE0843D841C3005A484D85256C0E.0073EC8F85256C0D@webforums>
References: <364_093AD5B2F4230AFF0072B30185256C0C.0072B30E85256C0C@webforums> <364_$yoO$zMPCHA.259@forums.sybase.com> <364_A529900308496F540067B46085256C0D.007D13CD85256C0C@webforums> <364_ESP34mYPCHA.198@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.powerbuilder.objects:1041
Article PK: 713605

Well I tried returning a byte array from a stored procedure into a blob,
but anything I tried to do with the blob at that point crashed
powerbuilder.
I don't have a lot of experience using blob's, so I might have been doing
it wrong, they don't exactly have a lot of methods pretty much add, edit
and toString() right?