Autor Beitrag
Mr.Anderson
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

Win XP Prof
D7
BeitragVerfasst: So 31.08.03 15:32 
Um Resourcen zu sparen beim start, will ich die datenbank erst aktivieren wenn sich der Wert in einer ComboBox ändert?

ist da ComboBoxOnChange das richtige? wenn ja wie ist der befehl dafür, habs nach mehrmaligem probieren nicht hingekriegt.

danke
FeG
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 77

Win XP Home, SuSE Linux 8.2 Prof
D3 Prof, D7 Prof
BeitragVerfasst: So 31.08.03 15:40 
Hallo,
Mr.Anderson hat folgendes geschrieben:
ist da ComboBoxOnChange das richtige?

Ja.
Zitat:
wenn ja wie ist der befehl dafür, habs nach mehrmaligem probieren nicht hingekriegt.

Der Befehl für was? Zum Aktivieren der Datenbank? -> Kommt auf die DB an...

MfG,
FeG
Mr.Anderson Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

Win XP Prof
D7
BeitragVerfasst: So 31.08.03 16:09 
für Table1 und DataSource1.

ich hätte es gerne so:

if ComboBox1.ItemIndex = 1 then AKTIVIERE DIE DATENBANK UND ZEIGE MIR DEN ERSTEN DATENSATZ AN.

bis jetzt starte ich das programm und es ist immer der erste datensatz zu sehen, ich will aber noch gar nix sehen, bis ich die combobox1 ändere.
FeG
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 77

Win XP Home, SuSE Linux 8.2 Prof
D3 Prof, D7 Prof
BeitragVerfasst: So 31.08.03 17:04 
Mr.Anderson hat folgendes geschrieben:
AKTIVIERE DIE DATENBANK UND ZEIGE MIR DEN ERSTEN DATENSATZ AN.

Wie wär's mit Table1.Active:=true?? Und halt anfangs im OI auf false setzen...

MfG,
FeG
Mr.Anderson Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

Win XP Prof
D7
BeitragVerfasst: So 31.08.03 17:16 
ich habs heute wohl nicht so mit dem denken.

danke für den tipp
barfuesser
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 324



BeitragVerfasst: Mo 01.09.03 12:55 
@Mr.Anderson:
Was passiert eigentlich, wenn jemand den 3. o. 4. Eintrag auswählt? Oder willst Du bei jedem Wechsel die Verbindung zur Datenbank öffnen und schließen? Dies wäre sehr schlecht für Deine Performance.

barfuesser
Mr.Anderson Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

Win XP Prof
D7
BeitragVerfasst: Mo 01.09.03 18:50 
nein die datenbank soll nur bei der ersten veränderung der combobox aktiviert werden, wenn sie aktiv ist, sollte sie auch aktiv bleiben.
FeG
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 77

Win XP Home, SuSE Linux 8.2 Prof
D3 Prof, D7 Prof
BeitragVerfasst: Mo 01.09.03 19:25 
Hi,

dann musst du natürlich noch im OnChange-Ereignis prüfen, ob die DB schon offen ist. Wenn ja, musst du nix machen...

MfG,
FeG
Mr.Anderson Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 29

Win XP Prof
D7
BeitragVerfasst: Mo 01.09.03 23:00 
jo danke, soweit hab ich auch schon gedacht, aber danke für die tips!!!