Autor Beitrag
Jagg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Do 16.01.03 11:44 
Hallo !

ich habe ein DBgrid und dadrin stehen viele datensätze und ich will das jeder datensatz mit einem bild verbunden wird !
Wie mach ich das am besten ???

ich habe mir überlegt noch eine spalte einzufügen mit dem Namen "Bild" und dadrin steht der pfad des bildes und jedesmal wenn der datensatz aktiv ist soll er aus dieser spalte das bild rauslesen !
Geht das noch einfacher ???

Jagg !
VizeTE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 30



BeitragVerfasst: Do 16.01.03 12:32 
Hallo.

Jepp, das geht noch einfacher. Du kannst bei der Tabellendefinition eine Splate hinzufügen die vom Typ "Grafik" ist. Naja der eigentliche Datentyp ist Blob (binary large object) aber die Auswahl in der Tabellenoberfläche von Delphi nennt sich "Grafik".
Diesem Feld kannst Du dann direkt Bilder zuweisen.

Ciao
Jagg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Do 16.01.03 12:50 
ich erkenn da kein blob ausserdem was ist dann daran anders wenn ich eine neue spalte hinzufüge´,das hab ich doch sowiseo vor !

Jagg !
VizeTE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 30



BeitragVerfasst: Do 16.01.03 12:57 
Zitat:
erkenn da kein blob


Der Spaltentyp nennt sich "grafik", nicht Blob (ist aber trotzdem ein Blob), was ja eigentlich egal ist.

Zitat:
was ist dann daran anders


Ich dachte nur das das vielleicht einfacher sein könnte da Du Dich dann nicht mehr um das verwalten (öffnen, speichern...) der Bilder kümmern musst. Das Bild dem Feld zuordnen und dann übernimmt Delphi den Rest für Dich.

War ja nur so ne Idee....
Jagg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Do 16.01.03 13:16 
also,ich erkenn da auch kein "Grafik" wenn ich eine neue spalte hinzufügen will und datenbankoberfläche !

Jagg !
VizeTE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 30



BeitragVerfasst: Do 16.01.03 15:22 
Das ist seltsam. Wenn ich eine Tabelle erstelle dann kann ich beim Datentyp der Spalte, mit der rechten Mousetaste angeklickt, aus einer vielzahl von Datentypen wählen. So auch den Datentyp "Grafik". Vielleicht ist das nicht bei allen Delphi-Versionen bei!?
Auch das LocalSQL kennt hier diesen Datentyp.
grayfox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 800

win98, winXP
D4 Standard; D6 Personal
BeitragVerfasst: Do 16.01.03 16:58 
hallo jagg!

nachdem du mit 'dbf'-dateien hantierst, gibts bei dir auch keinen feldtypen, der grafik heisst.
mit welcher dBase version sind die tabellen erstellt?
in der version 5.0 (dBase für windows) hast du die möglichkeit, 'OLE'-felder einzufügen.

wenn du dich in der datenbankoberfläche den eintrag 'feldtyp' markierst und danach auf 'hilfe' klickst, erfährst du was über seine verwendung.

mfg, stefan
Jagg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Do 16.01.03 17:06 
axo ok
DataCool
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 112



BeitragVerfasst: Fr 17.01.03 01:14 
Der Unterschied zwischen Deinem Lösungsansatz(Pfad des Bilds abspeichern) und der Ansatz mit dem Blob ist :

Das beim Blob nicht der Pfad sondern das komplette Bild in diesem Feld abgelegt werden.

_________________
DataCool
Jagg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Fr 17.01.03 21:48 
ich benutze delphi 5 enterprise
habe erstellt tabelle mit dbase IV oder muss ich andere tabelle nehmen,damit ich "grafik" auswählen kann,
und das ist ne das feld"OLE",ist es das gleiche wie grafik ?

Jagg !
grayfox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 800

win98, winXP
D4 Standard; D6 Personal
BeitragVerfasst: Sa 18.01.03 13:46 
hallo jagg!

eine dBase-Tabelle kennt das format 'grafik' nicht, auch nicht in der version 5. schau in der datenbankoberfläche nach. wenn du im feld 'typ' die leertaste oder die rechte maustaste drückst, bekommst eine auflistung aller möglichen feldtypen. und grafik ist nicht dabei -> ergo kannst du keinen grafik-typ deklarieren.

am einfachsten findest heraus, wie das mit einem OLE-feld funktioniert, wenn du es ausprobierst, nicht wahr? :D

waren arbeitest du eigentlich mit dBase-Files? sind paradox-files nicht einfacher zu handhaben?

mfg, stefan
Jagg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 635



BeitragVerfasst: Sa 18.01.03 20:57 
habe noch nie paradox gearebeitet
ist das besser als dbase ?
was sind die unterschiede ?`

Jagg !