Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: Vilhelm-Ion Praisach
  Where is Vilhelm-Ion Praisach?
 Resita
 Romania
 Vilhelm-Ion Praisach
 Tags
Subject: RE: CreateBinary is behaving different ...
Thread ID: 396077 Message ID: 396207 # Views: 54 # Ratings: 0
Version: Visual FoxPro 9 Category: VFP and .NET
Date: Thursday, January 23, 2014 3:00:24 PM         
   


> > on different CPU?
> >
> > I have code like this:
> >
> >
lcValue = CreateBinary( m.cValue )
> > 

> >
> > Which is then stored into a blob. This has been working all well up till last week on many installations. Last week at a customer, we were reported of a bug and checking it closely what I saw was that it is storing the value as a hex coded value instead. I then wrote code to check the situation as a work around. The thing I noticed was that the computer's CPU was Xeon. I wondered if that may be a reason that CreateBinary() is causing the value to be converted to hex.
> > ie:
> > Stores this:
> > 0h3441353335353737363534343431373734443434343137373444343434353737344135333537363733393333373133373538343637343731363436383735353234373537343735313733353337383631
> >
> > when it should be:
> > 0h4A535577654441774D4441774D4445774A5357673933713758467471646875524757475173537861
> >
> >
> >
> >

> > Cetin Basoz
> >
>
> I believe this is the explanation:
>
>
LOCAL cx,cw
> cx=CHR(0x4a)+CHR(0x53)+CHR(0x55)+CHR(0x77)
> cw=STRCONV(cx,15)
> ?CREATEBINARY(cx),CREATEBINARY(cw)

>
> My respects

Thanks for the reply, but it is the same CreateBinary( m.cValue ) in all systems. It stores as the latter, if run on any systems but that one.



Cetin Basoz

Give some sample data in code for your question - here is the tool you need to generate the code

My Blog


MongoDb Certified Developer
MongoDb Certified DBA


Support Wikipedia

ENTIRE THREAD

CreateBinary is behaving different ... Posted by Cetin Basoz @ 1/22/2014 6:46:38 PM
RE: CreateBinary is behaving different ... Posted by Vilhelm-Ion Praisach @ 1/22/2014 10:10:10 PM
RE: CreateBinary is behaving different ... Posted by Cetin Basoz @ 1/23/2014 3:00:24 PM
RE: CreateBinary is behaving different ... Posted by Vilhelm-Ion Praisach @ 1/23/2014 5:05:28 PM
RE: CreateBinary is behaving different ... Posted by Cetin Basoz @ 1/24/2014 2:03:25 PM
RE: CreateBinary is behaving different ... Posted by Martin Krivka @ 1/24/2014 6:06:08 PM
RE: CreateBinary is behaving different ... Posted by Cetin Basoz @ 1/24/2014 9:51:58 PM
RE: CreateBinary is behaving different ... Posted by Vilhelm-Ion Praisach @ 1/24/2014 7:31:16 PM
RE: CreateBinary is behaving different ... Posted by Cetin Basoz @ 1/24/2014 2:15:41 PM
RE: CreateBinary is behaving different ... Posted by Vilhelm-Ion Praisach @ 1/24/2014 7:33:51 PM