Autor Beitrag
mrbug
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44

Win XP,Win 2000,Suse 9.0
D7 Ent. , K3 Ent.
BeitragVerfasst: Do 01.07.04 12:02 
Hallo,

welche elementaren Komponenten braucht man bei einer dbexpress-Verbindung?

1. wenn man ein Grid anzeigen möchte

2. ohne Grid

Momentan habe ich 3 Komponenten:

TDadamodule --> TSQLQuery --> TDataSource. Das Problem iost, dass ich keine Daten ins Grid bekomme UND dass ich wenn ich edit mache eine Fehlermeldung bekomme: Operation bei unidirektionaler Datenmenge nicht gestattet.


Help, I need somebody, help......

Markus :D

_________________
HoffentlichbaldkeinAnfängermehrseier
fuser
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Do 01.07.04 13:04 
Ohne Grid: SQLConnection und SQLQuery.

Mit Grid und SimpleDataset:

SQLConnection1

SimpleDataset1
Connection -> SQLConnection1
Dataset.CommandText -> Dein Select-SQL

Datasource1
Dataset -> SimpleDataset1
OnDataChange ->
if SimpleDataset1.Active and (SimpleDataset1.UpdateStatus=usModified)
then SimpleDataset1.ApplyUpdates(0);

DBGrid1
Datasource -> Datasource1
mrbug Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44

Win XP,Win 2000,Suse 9.0
D7 Ent. , K3 Ent.
BeitragVerfasst: Do 01.07.04 13:44 
Danke! Werds sofort probieren!!!!

_________________
HoffentlichbaldkeinAnfängermehrseier
mrbug Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44

Win XP,Win 2000,Suse 9.0
D7 Ent. , K3 Ent.
BeitragVerfasst: Do 01.07.04 14:30 
Bist Du Dir sicher mit dem SimpleDataSet? Da ist keine Eigenschaft .CommandText....
Meinst Du SQLDataSet??

Hab ich damit dann auch Schreibzugriff? Wie?


Markus

_________________
HoffentlichbaldkeinAnfängermehrseier
fuser
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Fr 02.07.04 08:38 
mrbug hat folgendes geschrieben:
Bist Du Dir sicher mit dem SimpleDataSet? [...]

Ja!
SimpleDataset.Dataset.Commandtext

mrbug hat folgendes geschrieben:
Hab ich damit dann auch Schreibzugriff? Wie? [...]

Ja!
Im Grid :wink:
mrbug Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44

Win XP,Win 2000,Suse 9.0
D7 Ent. , K3 Ent.
BeitragVerfasst: Fr 02.07.04 10:14 
entweder ich bin zu doof oder ich raffs nicht.. :shock:


Warum kann ich beim simpledataset active nicht auf true setzen?
wo kann ich die felder dazufügen??

heul....




Markus

_________________
HoffentlichbaldkeinAnfängermehrseier
fuser
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Fr 02.07.04 12:27 
Hallo!
Also der Reihe nach:
1. SQLConnection einstellen und prüfen (Active=on)
2. SimpleDataset Connection auf SQLConnection1
3. Auf Dataset klicken
4. Auf Command Text klicken
5. Und hier kommt der SQL rein (und damit die Felder)
6. SimpleDataset prüfen (Active=on)