Autor Beitrag
Becks16
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 405



BeitragVerfasst: Mi 08.06.05 11:10 
Hallo
Ich habe mal eine frage und zwar wie kann ich ein Bild in der Datenbank speichern ?ß Gibt es da so ein Dialog wie man das Bild auswählen kann wie z.b. OpenDialog ???

mfg

_________________
Ich bin Dumm und weiss nichts :-)
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Mi 08.06.05 11:26 
verwende am besten mal die forensuche: Suche in: Delphi-Forum, Delphi-Library BILDER DATENBANK
die frage wurde schon x-mal gestellt. und ohne zu wissen welche datenbank du verwendest, tappen wir hier im dunkeln

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Becks16 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 405



BeitragVerfasst: Mi 08.06.05 12:01 
Ich benutze MYSQL Front ....... beim suchen im forum finde ich irgendwie nie das richtige ....

mfg

_________________
Ich bin Dumm und weiss nichts :-)
neojones
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1206
Erhaltene Danke: 1



BeitragVerfasst: Mi 08.06.05 12:06 
Du benutzt mySQL. Und dafür wurde die Frage hier schon mehrfach beantwortet.

TDBimage benutzen und dann mit LoadFromFile arbeiten.
Feldtyp auf der Datenbank ist ein Blob.

Die Frage wurde

hier www.delphi-forum.de/...ld+datenbank+dbimage
hier www.delphi-forum.de/...ld+datenbank+dbimage
hier www.delphi-forum.de/...ld+datenbank+dbimage
hier www.delphi-forum.de/...ld+datenbank+dbimage
und hier www.delphi-forum.de/...ld+datenbank+dbimage

schon angesprochen.

_________________
Ha! Es compiliert! Wir können ausliefern!
Becks16 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 405



BeitragVerfasst: Mi 08.06.05 12:48 
gibt es denn da irgend eine möglichkeit so ein dialoog zu öffnen um an den pfad des bildes zubekommen ? ich muss ja irgend was drücken um das bild da rein zubekommen ..

mfg

_________________
Ich bin Dumm und weiss nichts :-)
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Mi 08.06.05 12:59 
das machst du mit dem opendialog
ausblenden Delphi-Quelltext
1:
if opendialog1.execute then TueEtwasMit ( opendialog1.filename );					

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 08.06.05 12:59 
Schonmal im Register Dialog die Komponente TOpenDialog gesehen? Irgendwo gibts auch einen TOpenPictureDialog. Ich glaube das war bei den Jedi-Komponenten. Das muss man aber nicht dafür haben.
neojones
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1206
Erhaltene Danke: 1



BeitragVerfasst: Mi 08.06.05 13:00 
Im Delphi, Register Dialoge, Komponente "TOpenPictureDialog"

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
If OpenPictureDialog1.Execute = True then begin
   MeineTabelle.Edit;
   DBImage1.Picture.LoadFromFile(OpenPictureDialog1.FileName);
   MeineTabelle.Post;
end;


Kann es sein, dass Du gar keine Lust hast die Suchfunktion zu benutzen?

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.

_________________
Ha! Es compiliert! Wir können ausliefern!
Becks16 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 405



BeitragVerfasst: Mi 08.06.05 13:03 
ja ich habe das schon gefunden diese OpenPictureDialog dann habe ich einen Button erstelt mit folgender Anweisung

ausblenden Delphi-Quelltext
1:
2:
3:
if OpenPictureDialog1.Execute then

   filename := OpenPictureDialog1.FileName;


wenn ich jetzt den button anklicke öffnet sich das Dialog fenster aber wie kann ich jetzt das ausgewählte Bild in mein DBImage laden ???

vielen danke für eure hilfe

mfg

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.

_________________
Ich bin Dumm und weiss nichts :-)
Lemmy
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 792
Erhaltene Danke: 49

Windows 7 / 10; CentOS 7; LinuxMint
Delphi 7-XE10.1, VS 2015
BeitragVerfasst: Mi 08.06.05 15:00 
Junger Vater: Du hast den Dateinamen des Bildes in einer Variable und auf der anderen Seite ein DBImage. Schon mal bei den Eigenschaften von DBImage nachgeschaut? Das DBImage markiert und F1 auf der Tastatur gedrückt???

ausblenden Delphi-Quelltext
1:
DBImage.picture.loadFromFile(filename);					


Lemmy
Becks16 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 405



BeitragVerfasst: Fr 10.06.05 09:22 
Ich habe auf einmal wieder ein Speicher problem er speichert mir mein Bild nicht mehr ich weiss nicht warum. Ich lade es in mein DBImage und will dann speichern und dann nimmt er das bild wieder raus. Ich speicher mit dem DBNavigator...

mfg

_________________
Ich bin Dumm und weiss nichts :-)
Becks16 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 405



BeitragVerfasst: Fr 10.06.05 09:29 
da ist doch kein fehler im quelltext es liegt daran das ich kein jpeg speichern kann bmp speichert er ohne Probleme ab....

mfg

_________________
Ich bin Dumm und weiss nichts :-)