Board index » delphi » Paradox cannot create case-sensitive index?

Paradox cannot create case-sensitive index?

Hi,
I encountered a problem which is frustrating me much.
I tried to create paradox table with case-sensitive index by the following
code, but failed:

  with Table1 do
   begin
   TableType := ttParadox;
   TableName := 'test';
   DatabaseName := 'c:\temp';
  {set table structure}
   with FieldDefs do
    begin
       Clear;
         Add('ID',ftAutoInc,0,False);
         Add('Field1',ftString,4,False);
     end;
   with IndexDefs do
    begin
     Clear;
         Add('','ID',[ixPrimary]);
         Add('Filed1Indx','Field1',[]);
    end;
     {and create the table fails!!}
     CreateTable;
   end;

Please help me to understand what is going on?
I use Paradox supplied with Delphi5.
It doesn't support case-sensitive indexes or I am missing something?

Thanks in advance,
John

 

Re:Paradox cannot create case-sensitive index?


Sometimes the best way to understand how the BDE works with the
indexes and what it will support is to first interactively create
that index in Database Desktop, and look for error messages, if
any.

In this case, I think it's because single-field, case-sensitive
indexes have a reserved name, which is identical to the field
name.

Rick Carter
Rick.Car...@cincww.rcc.org
Chair, Paradox/Delphi SIG, Cincinnati PC Users Group

Re:Paradox cannot create case-sensitive index?


Single field case sensitive secondary indices on Paradox tables _must_
have the same name as the field.

Quote
On Fri, 12 Jul 2002 12:22:51 +0400, "John Hopkins" <none> wrote:
>Hi,
>I encountered a problem which is frustrating me much.
>I tried to create paradox table with case-sensitive index by the following
>code, but failed:

>  with Table1 do
>   begin
>   TableType := ttParadox;
>   TableName := 'test';
>   DatabaseName := 'c:\temp';
>  {set table structure}
>   with FieldDefs do
>    begin
>       Clear;
>         Add('ID',ftAutoInc,0,False);
>         Add('Field1',ftString,4,False);
>     end;
>   with IndexDefs do
>    begin
>     Clear;
>         Add('','ID',[ixPrimary]);
>         Add('Filed1Indx','Field1',[]);
>    end;
>     {and create the table fails!!}
>     CreateTable;
>   end;

>Please help me to understand what is going on?
>I use Paradox supplied with Delphi5.
>It doesn't support case-sensitive indexes or I am missing something?

>Thanks in advance,
>John

--
Bill (TeamB)
(TeamB cannot respond to questions received via email)

Other Threads