🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3694

Re: INDEX PROBLEM

#3694
From: Ola Eriksen
Date: Mon, 08 Jul 2002 09:59
54 lines
2170 bytes
Hi!

I don't know why you resive the error message, but if you only want to sort
the table you can do this instead:

Place a TQuery and a TDatasource component and just :

          Table1->Close();
          Table1->SQL->Clear();
          Table1->SQL->Add("SELECT * FROM table ORDER BY term_no";
          Table1->ExecSQL();
          Table1->Active = true;


/Ola



"G�khan �ATALKAYA" wrote:

> Hi;
>
> I have created an index on a paradox 7.0 table named teminat_tbl with the
> following command.
>
> create index index1 on teminat_tbl (term_no)
>
> And I have the following code to sort the table to the term_no
>
> Table1->Active = false;
>
> Table1->IndexDefs->Update();
>
> for (int i = 0; i < Table1->IndexDefs->Count; i++)
>   if (Table1->IndexDefs->Items[i]->Fields == AnsiString("TERM_NO"))
>   {
>         Table1->IndexName = Table1->IndexDefs->Items[i]->Name;
>     break;
>   }
>
> Table1->Active = true;
>
> Everything is OK in Compile Time But i have taken an error message in run
> time like
>
> Project raised exception class EDBEngine Error with message 'index is read
> only'. Process stop. Use Step or Run to Continue.
>
> Do yu think what causes the problem, and hhow can i overcome it?
>
> Thank you.
>
> --
> G�khan �ATALKAYA
Technical Details
Message-ID: <3D29628B.512F292@callcom.no>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!hermes.visi.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews
References: <3d254849_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,f4b2f307d9aae5e9
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-07-08 02:04:24 PST
Message-ID: <3D29628B.512F292@callcom.no>
Date: Mon, 08 Jul 2002 10:59:39 +0100
From: Ola Eriksen <ola@callcom.no>
X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: INDEX PROBLEM
References: <3d254849_1@dnews>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 193.69.252.248
X-Trace: dnews 1026118816 193.69.252.248 (8 Jul 2002 02:00:16 -0700)
Lines: 55
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!hermes.visi.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews