Quantcast
Channel: SCN: Message List - SAP Advantage Database Server
Viewing all articles
Browse latest Browse all 997

Problem with ADS 11 and Delphi XE8 when using locate and SQL-Statement

$
0
0

Problem with ADS 11 and Delphi XE8 when using locate and SQL-Statement. With Delphi XE6 it works.

 

Example:

CREATE TABLE test (

      TETENR CIChar( 15 ),

      PREZPR Double( 4 ),

      PreisEinh Short) IN DATABASE;

EXECUTE PROCEDURE sp_CreateIndex90(

   'test',

   'test.adi',

   'I_TETENR',

   'TETENR',

   '',

   2051,

   512,

   '' );

insert into test values('105256', 67.36, 1)

 

 

Delphi dfm:

object Form1: TForm1

  Left = 0

  Top = 0

  Caption = 'Form1'

  ClientHeight = 176

  ClientWidth = 346

  Color = clBtnFace

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'Tahoma'

  Font.Style = []

  OldCreateOrder = False

  OnDestroy = FormDestroy

  OnShow = FormShow

  PixelsPerInch = 96

  TextHeight = 13

  object Edit1: TEdit

    Left = 8

    Top = 8

    Width = 121

    Height = 21

    TabOrder = 0

    Text = '105334'

  end

  object Button1: TButton

    Left = 135

    Top = 8

    Width = 75

    Height = 25

    Caption = 'Button1'

    TabOrder = 1

    OnClick = Button1Click

  end

  object AdsConnection1: TAdsConnection

    AliasName = 'MP_REMOTE_UNICODE'

    AdsServerTypes = [stADS_REMOTE]

    LoginPrompt = False

    Username = 'GAST'

    Password = 'xxxxx'

    StoreConnected = False

    AdsCollation = 'ANSI:de_DE_ADS_CI'

    DateFormat = 'dd.MM.ccyy'

    Left = 61

    Top = 59

  end

  object AdsQuery1: TAdsQuery

    DatabaseName = 'AdsConnection1'

    ParamCheck = False

    SQL.Strings = (

      'select TETENR, IIF(PreisEinh=0, 0, PREZPR/PreisEinh) as Preis '

      '  from test')

    AdsConnection = AdsConnection1

    Left = 160

    Top = 64

    ParamData = <>

  end

end

 

 

Delphi pas:

procedure TForm1.Button1Click(Sender: TObject);

begin

  if AdsQuery1.Locate('tetenr', Edit1.Text, []) then // Error

    showmessage('gefunden')

end;


Viewing all articles
Browse latest Browse all 997

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>