Autor Beitrag
mexx
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 13.04.07 11:40 
Hallo,

ich verwende die BDE für den Verbindungsaufbau zu einer FireBird-Datenbank. Leider kann ich mich nicht von der BDE trennen.

Schreibe ich Daten in die Datenbank, werden Umlaute in andere Symbole gewandelt. Als LANGDRIVER des Alias bzw. BDE|Konfiguration|System|INIT|LANGDRIVER habe ich Paradox 'intl' drin stehen. Angeblich richtig, aber die Umlaute bleiben keine ü,ä,ö. Woran kann das noch liegen?

Gruß mexx

_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Fr 13.04.07 11:54 
Wie ist die Datenbank deklariert?

_________________
Markus Kinzler.
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 13.04.07 11:59 
Was meinst Du genau? Als Alias!?!

_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Fr 13.04.07 12:06 
Nein Die in Datenbank (felder usw.)

_________________
Markus Kinzler.
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 13.04.07 12:08 
Das betreffende Feld ist ein Blob vom Typ 1.

_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Fr 13.04.07 12:39 
Und der Zeichensatz?

_________________
Markus Kinzler.
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 13.04.07 12:50 
Ich habe soeben etwas rausgefunden.

Bei der ganzen Sache dreht es sich darum, dass ich einen Report in einer MemoryStream lade, diesen als Parameter an einer Query übergebe, die diesen Blob in die Datenbank schreibt. Offensichtlich wird bereits vor dem Insert in die Datenbank das Blob verfälscht. Entweder beim Laden des Reports in die MemoryStream oder bei der übergabe an den Parameter der Query. Hier mal der Code.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
...
Blobstream := TMemoryStream.Create;
BlobStream.Position := 0;
MainFstRpt.Report.SaveToStream(BlobStream);
ParamByName('FastReport').LoadFromStream(BlobStream,ftBlob);
...


Ich kann mit einer Showmessage das Value des Parameters FastReport ansehen und stelle fast, dass das Ü aus ## besteht. Wie finde ich nun raus, ob beim Laden des Reports der Fehler passiert oder beim Übergeben an den Parameter. Wie kann ich mir den Inhalt des BlobStream nach dem SaveToStream ansehen?

_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Fr 13.04.07 13:01 
Du könntest ihn in eine Datei Schreiben oder wieder in eine Komponente Laden

_________________
Markus Kinzler.
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 13.04.07 13:08 
Wie geht das in die Datei schreiben?

_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 13.04.07 13:26 
Ich habs mal so versucht, erhalte aber eine leere Showbox.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
BlobStream.Read(i,SizeOf(Integer)); 
SetLength(BlobString,i); 
BlobStream.Read(BlobString[1],i); 
ShowMessage(BlobString);

_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.
noidic
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 851

Win 2000 Win XP Vista
D7 Ent, SharpDevelop 2.2
BeitragVerfasst: Fr 13.04.07 13:28 
Setz mal BlobStream.Position := 0 vor dem anzeigen.

_________________
Bravery calls my name in the sound of the wind in the night...
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 13.04.07 13:30 
Immernoch kein Text in der Showmessage.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
    BlobStream.Read(i,SizeOf(Integer));
    SetLength(BlobString,i);
    BlobStream.Read(BlobString[1],i);
    BlobStream.Position := 0;
    showmessage(BlobString);

_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.
noidic
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 851

Win 2000 Win XP Vista
D7 Ent, SharpDevelop 2.2
BeitragVerfasst: Fr 13.04.07 13:32 
Mh, mit .SaveToFile kannste den Stream ja mal in ne Datei stopfen und schaun, was da dann drin steht.

_________________
Bravery calls my name in the sound of the wind in the night...
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 13.04.07 13:36 
Das wollte ich ja wissen, wie das geht. Ein BlobStream.SaveToFile habsch net!!!

_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.
noidic
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 851

Win 2000 Win XP Vista
D7 Ent, SharpDevelop 2.2
BeitragVerfasst: Fr 13.04.07 13:40 
Also laut meiner Hilfe hat TMemoryStream die Funktion SaveToFile. Und soweit ich das weiter oben gelesen habe, ist BlobStream och ein TMoryStream, oder?

_________________
Bravery calls my name in the sound of the wind in the night...
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 13.04.07 13:42 
Ich weiß, laut meiner Hilfe ist diese Methode vorhanden.
Aber ich erhalte als Debugmeldung: undefinierter Bezeichner 'SaveToFile'

ausblenden Delphi-Quelltext
1:
BlobStream.SaveToFile('D:\test.txt');					

_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.
noidic
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 851

Win 2000 Win XP Vista
D7 Ent, SharpDevelop 2.2
BeitragVerfasst: Fr 13.04.07 13:44 
Als was ist Blobstream denn deklariert, als TStream oder als TMemorystream? gepostet hast leider nur die Zuweisung...

_________________
Bravery calls my name in the sound of the wind in the night...
mexx Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1183



BeitragVerfasst: Fr 13.04.07 13:45 
Es handelt sich um ein TMemoryStream.

_________________
Das Unsympathische an den Computern ist, dass sie nur ja oder nein sagen können, aber nicht vielleicht.
noidic
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 851

Win 2000 Win XP Vista
D7 Ent, SharpDevelop 2.2
BeitragVerfasst: Fr 13.04.07 13:48 
Das mal arg seltsam... da weiss ich leider auch nicht weiter, wenn Delphi schon Methoden vergisst :?!?:

_________________
Bravery calls my name in the sound of the wind in the night...