Autor Beitrag
Killi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 299

Win*
D6 Prof
BeitragVerfasst: Di 20.09.05 20:45 
Hi,

ich bekomme bei folgendem Code immer einen Fehler:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
     test:= 4.50;

     QData2.Active:= False;
     QData2.SQl.Clear;
     QData2.SQl.Add('Insert into liefer (Gesamtpreis) values (' + FloatToStr(test) + ')');
     QData2.ExecSQL;


EDBEngineError - Meldung: 'Ungültiger Parameter'

wenn ich dagegen

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
     test:= 4.50;

     QData2.Active:= False;
     QData2.SQl.Clear;
     QData2.SQl.Add('Insert into liefer (Gesamtpreis) values (4.50)');
     QData2.ExecSQL;

schreibe, dann funktioniert es - aber das mache ich auch mit "test" oder nicht???
Gesamtpreis ist vom Typ Währung.


Irgendwie ist heute nicht mein Tag...bin überarbeitet...früher hatte ich nie Probleme mit so etwas!?

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

_________________
----
Life is hard and then you die
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 20.09.05 20:51 
iirc berücksichtigt FloatToStr den Dezimal-Separator in den Windows-Einstellungen.
Wenn du im Source den Wert für DecimalSeparator anpasst, sollte es funktionieren:
ausblenden Delphi-Quelltext
1:
DecimalSeparator := '.';					
Killi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 299

Win*
D6 Prof
BeitragVerfasst: Di 20.09.05 20:57 
Wow...ok...danke.....


Du bist heute mein Held und Retter in der Not!!!!!! DANKE!

_________________
----
Life is hard and then you die