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.

oem table how to read ascii field

4 posts in DelphidotNet Last posting was on 2006-01-03 15:31:35.0Z
Rados³aw Wójtowicz Posted on 2005-12-22 11:54:00.0Z
From: "Rados³aw Wójtowicz" <francja@elegancja>
Newsgroups: Advantage.DelphidotNet
Subject: oem table how to read ascii field
Date: Thu, 22 Dec 2005 12:54:00 +0100
Lines: 9
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: 83.17.226.42
Message-ID: <43aa9324@solutions.advantagedatabase.com>
X-Trace: 22 Dec 2005 04:51:00 -0700, 83.17.226.42
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!83.17.226.42
Xref: solutions.advantagedatabase.com Advantage.DelphidotNet:80
Article PK: 1108515

Hello

I have question about reading a one field from table but i must read it
without converting o oem. Table is dbf/cdx on Data Dictionary and is OEM.
I't posible to read char field as ASCI not OEM?


Mark Wilkins Posted on 2005-12-22 18:46:19.0Z
From: "Mark Wilkins" <tired@of.spam>
Newsgroups: Advantage.DelphidotNet
References: <43aa9324@solutions.advantagedatabase.com>
Subject: Re: oem table how to read ascii field
Date: Thu, 22 Dec 2005 11:46:19 -0700
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 198.102.102.12
Message-ID: <43aaf3c6@solutions.advantagedatabase.com>
X-Trace: 22 Dec 2005 11:43:18 -0700, 198.102.102.12
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!198.102.102.12
Xref: solutions.advantagedatabase.com Advantage.DelphidotNet:81
Article PK: 1108516

If you open the table with the ADS_OEM character type, then there is no
direct way to read a field's exact data. The Advantage Client Engine always
performs the OEM -> ANSI translation before returning character data to the
calling application.

The "simple" way to do this is to open the table with character type
ADS_ANSI, then the translation will not be performed. However, if the table
really is OEM data, then that could lead to problems if you make updates to
the table.

The only way that comes to mind to read the data without the translation is
to use the Advantage Client Engine API directly. You could call
AdsGetRecord, which returns the raw record buffer. You could then read the
data directly from that buffer.

Mark Wilkins
Advantage R&D

"Rados³aw Wójtowicz" <francja@elegancja> wrote in message
news:43aa9324@solutions.advantagedatabase.com...
> Hello
>
> I have question about reading a one field from table but i must read it
> without converting o oem. Table is dbf/cdx on Data Dictionary and is OEM.
> I't posible to read char field as ASCI not OEM?
>
>
>
>


Rados³aw Wójtowicz Posted on 2005-12-27 07:50:39.0Z
From: "Rados³aw Wójtowicz" <francja@elegancja>
Newsgroups: Advantage.DelphidotNet
References: <43aa9324@solutions.advantagedatabase.com> <43aaf3c6@solutions.advantagedatabase.com>
Subject: Re: oem table how to read ascii field
Date: Tue, 27 Dec 2005 08:50:39 +0100
Lines: 55
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 83.17.226.42
Message-ID: <43b0f198@solutions.advantagedatabase.com>
X-Trace: 27 Dec 2005 00:47:36 -0700, 83.17.226.42
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!83.17.226.42
Xref: solutions.advantagedatabase.com Advantage.DelphidotNet:82
Article PK: 1108517

I'm sorry, but i forgot to mention that i use Adavantage Data Provider, and
i't ASP .NET application in delphi. So i can't use Advantage API. I only
must read this field. This is coded password from clipper application,
maybe is any way to compare password from user but sql query don't work :/

select * from table_name where password_field=:User_phraze;

where:
User_phraze:= MyCrypt(User_input);



--
----------------------------------------------------
Rados³aw Wójtowicz
F.H.U.P ASCO




U¿ytkownik "Mark Wilkins" <tired@of.spam> napisa³ w wiadomo¶ci
news:43aaf3c6@solutions.advantagedatabase.com...

> If you open the table with the ADS_OEM character type, then there is no
> direct way to read a field's exact data. The Advantage Client Engine
> always performs the OEM -> ANSI translation before returning character
> data to the calling application.
>
> The "simple" way to do this is to open the table with character type
> ADS_ANSI, then the translation will not be performed. However, if the
> table really is OEM data, then that could lead to problems if you make
> updates to the table.
>
> The only way that comes to mind to read the data without the translation
> is to use the Advantage Client Engine API directly. You could call
> AdsGetRecord, which returns the raw record buffer. You could then read
> the data directly from that buffer.
>
> Mark Wilkins
> Advantage R&D
>
> "Rados³aw Wójtowicz" <francja@elegancja> wrote in message
> news:43aa9324@solutions.advantagedatabase.com...
>> Hello
>>
>> I have question about reading a one field from table but i must read it
>> without converting o oem. Table is dbf/cdx on Data Dictionary and is OEM.
>> I't posible to read char field as ASCI not OEM?
>>
>>
>>
>>
>
>


Mark Wilkins Posted on 2006-01-03 15:31:35.0Z
From: "Mark Wilkins" <tired@of.spam>
Newsgroups: Advantage.DelphidotNet
References: <43aa9324@solutions.advantagedatabase.com> <43aaf3c6@solutions.advantagedatabase.com> <43b0f198@solutions.advantagedatabase.com>
Subject: Re: oem table how to read ascii field
Date: Tue, 3 Jan 2006 08:31:35 -0700
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 198.102.102.12
Message-ID: <43ba981e@solutions.advantagedatabase.com>
X-Trace: 3 Jan 2006 08:28:30 -0700, 198.102.102.12
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!198.102.102.12
Xref: solutions.advantagedatabase.com Advantage.DelphidotNet:83
Article PK: 1108518

If you cannot use an ANSI table, another possibility might be to store the
data in a BLOB field. The OEM to ANSI conversion is not performed on that
field type.

Mark Wilkins
Advantage R&D

"Rados³aw Wójtowicz" <francja@elegancja> wrote in message
news:43b0f198@solutions.advantagedatabase.com...
> I'm sorry, but i forgot to mention that i use Adavantage Data Provider,
> and i't ASP .NET application in delphi. So i can't use Advantage API. I
> only must read this field. This is coded password from clipper
> application, maybe is any way to compare password from user but sql query
> don't work :/
>
> select * from table_name where password_field=:User_phraze;
>
> where:
> User_phraze:= MyCrypt(User_input);
>