Autor Beitrag
DelphiGreenhorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Fr 09.05.08 09:55 
Hallo Forum,

vielleicht kann mir ja jemand mit meinem Problem weiterhelfen?
Habe hier ein Tool, dass Tabellen exportieren und wieder importieren kann.
Innerhalb dieses Tools werden Paradoxtabellen erzeugt und dann wieder eingelesen.
Dazu wird dann eine TTableKomponente verwendet.

Zum Problem:
Bei Currencyfeldern kommt es dann zu Problemen mit den Nachkommastelle der Currencywerte.
Der MSSQL-Server scheint hier alle Currencywerte mit 100 zu multiplizieren.

Beispiel:
123,45 € -> 12345,00 €

Wenn ich jetzt in der Application den Wert durch 100 teile sieht es wie folgt aus:
1,2345 -> 123,00 €

Hat jemand vielleicht schon mit diesem Problem auf dem MSSQL-Server zu tun gehabt und hat eine Lösung dafür?


Danke schon mal.

MfG

_________________
-= 90% der Fehler sitzen ca. 50cm hinter dem Bildschirm =-
Robert.Wachtel
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 895
Erhaltene Danke: 7

Windows 7 Ultimate x64
D5 Ent, D7 Arch, RAD Studio 2010 Pro, VS 2008
BeitragVerfasst: Fr 09.05.08 10:35 
Wie greifst Du auf den MSSQL-Server zu?
DelphiGreenhorn Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Fr 09.05.08 10:39 
Über die BDE mit einer TTable.

MfG

_________________
-= 90% der Fehler sitzen ca. 50cm hinter dem Bildschirm =-
Robert.Wachtel
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 895
Erhaltene Danke: 7

Windows 7 Ultimate x64
D5 Ent, D7 Arch, RAD Studio 2010 Pro, VS 2008
BeitragVerfasst: Fr 09.05.08 11:08 
Schau mal, ob es in der BDE irgendwo eine Einstellung EnableBCD o.ä. gibt.

Ansonsten ist natürlich die BDE (womöglich noch über ODBC) die denkbar schlechteste Datenzugriffsschicht im Zusammenhang mit einem MS-SQL-Server.
DelphiGreenhorn Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Fr 09.05.08 11:11 
Das mit der BDE und dem MSSQL-Server ist mir bewusst. Kann es aber nicht ändern.
EnableBCD steht auf False.
Das Feld in der DB ist Money.

MfG

_________________
-= 90% der Fehler sitzen ca. 50cm hinter dem Bildschirm =-
Robert.Wachtel
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 895
Erhaltene Danke: 7

Windows 7 Ultimate x64
D5 Ent, D7 Arch, RAD Studio 2010 Pro, VS 2008
BeitragVerfasst: Fr 09.05.08 11:28 
Ja, und? Was passiert, wenn Du die Einstellung von EnableBCD änderst?
DelphiGreenhorn Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Fr 09.05.08 11:30 
Dann krieg ich eine Exception beim Post der TTable.

MfG

_________________
-= 90% der Fehler sitzen ca. 50cm hinter dem Bildschirm =-
Robert.Wachtel
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 895
Erhaltene Danke: 7

Windows 7 Ultimate x64
D5 Ent, D7 Arch, RAD Studio 2010 Pro, VS 2008
BeitragVerfasst: Fr 09.05.08 12:00 
Die da lautet?
DelphiGreenhorn Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Fr 09.05.08 12:04 
EDBEngineError: 'Übersetzungfehler. Der Wert liegt nicht im gültigen Bereich.'

Müsste man nicht dazu das Feld in der TTable auch auf BCD umstellen?

MfG

_________________
-= 90% der Fehler sitzen ca. 50cm hinter dem Bildschirm =-
Robert.Wachtel
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 895
Erhaltene Danke: 7

Windows 7 Ultimate x64
D5 Ent, D7 Arch, RAD Studio 2010 Pro, VS 2008
BeitragVerfasst: Fr 09.05.08 12:10 
Du arbeitest mit persistenten Fields? Ja, dann wäre das durchaus möglich.
DelphiGreenhorn Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 31



BeitragVerfasst: Fr 09.05.08 12:13 
Nein, aber über die FieldDefs kann man die entsprechend in der TTable ändern.
Habs grad eben mal geändert. Fehler bleibt der gleiche.

MfG

_________________
-= 90% der Fehler sitzen ca. 50cm hinter dem Bildschirm =-
Robert.Wachtel
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 895
Erhaltene Danke: 7

Windows 7 Ultimate x64
D5 Ent, D7 Arch, RAD Studio 2010 Pro, VS 2008
BeitragVerfasst: Fr 09.05.08 12:36 
Dann muss jetzt jemand anders übernehmen...
Bernhard Geyer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 721
Erhaltene Danke: 3



BeitragVerfasst: Mo 12.05.08 08:21 
Ich könnte mir vorstellen das das gar nicht mehr über BDE/ODBC (bzw. SQL-Links geht). Beim MS SQL-Server ist schon seit 1997 der Weg über ODBC oder SQL Links veraltet und wird nur noch so Lala gepflegt. U.u. wurde durch einen der vielen Windows/MDAC/ADO/...-Updates dieser weg für den Datentyp Currency lahm gelegt bzw. verhält sich nicht mehr so wie es die BDE erwartet (ist ja auch schon seit fast 10 Jahren abgekündigt).

Du könntest folgendes Probieren:

1, Bei BDE: Stell dein Posts auf INSERT-Queries mit Paramter um
2, Stell den Zugrif auf ADO um (ohne ODBC, direkt auf den Server)
3, Stell auf ADO + INSERT-Queries mit Parameter um.
Robert.Wachtel
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 895
Erhaltene Danke: 7

Windows 7 Ultimate x64
D5 Ent, D7 Arch, RAD Studio 2010 Pro, VS 2008
BeitragVerfasst: Mo 12.05.08 10:10 
Wobei wir bisher weder wissen, welches Betriebssystem oder welcher MS-SQL-Server hier eingesetzt wird noch ob der Zugriff wirklich über ODBC erfolgt.

Und eine Umstellung weg von der BDE hat der OP ja schon ausgeschlossen.