![]() |
SQL: Index hinzufügen
Moin,
folgende Anweisung funzt nicht:
Delphi-Quellcode:
Da bekomm ich ne Exception: File must be opened exclusively
Query.close;
Query.SQL.Text:='ALTER TABLE myTable ADD INDEX TitleIndex (titel)'; Query.ExecSQL; Wie gehts denn richtig? Gruß Gambit |
Re: SQL: Index hinzufügen
Zitat:
an anderer Stelle geöffnet. Es reicht schon, wenn in der Delphi IDE eine Query/Table Komponente auf Active=True steht. Du musst ausserdem das Property Exclusive der TDatabase-Komponente auf True setzen. (je nachdem, mit welchen Komponenten du arbeitest) |
Re: SQL: Index hinzufügen
Hmm...ist ne Zeos-Query...jetzt hab ich mal active=false gesetzt und bekomm ne Exception "Syntax Error".
Komisch das... Gruß Gambit |
Re: SQL: Index hinzufügen
Es ist damit natürlich gemeint, dass keine andere Komponente gerade auf diese Tabelle zugreift und ebenso keine andere Anwendung.
:coder: |
Re: SQL: Index hinzufügen
achso, hmm...klar. Es greift auch nix anderes auf die Tabelle zu. Das Property Exclusive kann ich allerdings bei meinen Zeos Komponenten, die ich verwende, nirgens finden...
Gruß Gambit |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:33 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz