Board index » delphi » SQL-Server 6.5 (German) / BDE5 (German) and datetime-fields

SQL-Server 6.5 (German) / BDE5 (German) and datetime-fields

I'm using SQL-Server 6.5 (German) with Delphi 2.0 (German) and
BDE/SQL-Links 5 (German) and have problems while editing datetime-fields.
If i try to edit a datetime-field I get an errormessage from the SQL-Server
telling me that he cannot convert to a datetime-value.

Using SQL-Trace I can see that the BDE sends an SQL-statement with the date
in the format DEC 12 1998.
But my german Server expects the date in the format DEZ 12 1998
(the shortnames for october,dezember in German are OKT,DEZ and not OCT,DEC)

How can I make the BDE 5 (German) to send the shortnames for the month in
german format ?. Or how can I make a German SQL-Server to Accept the
US-English shortnames for month
(SET LANGUAGE US_ENGLISH doesn't work)

I have tried anything I knew including LongDateFormat,ShortDateFormat in
Delphi and Dateformat and Language in BDE-Config.

What is wrong ?

--
Thomas Friedmann
i.d.e.e. Beratungsges. mbH
106333.2...@compuserve.com

 

Re:SQL-Server 6.5 (German) / BDE5 (German) and datetime-fields


Quote
>I have tried anything I knew including LongDateFormat,ShortDateFormat in
>Delphi and Dateformat and Language in BDE-Config.

>What is wrong ?

I had the same Problem, I believe the solution is SQL-Client Configuration

Check Automatic Ansi to OEM
Uncheck Use International Settings

manfred elter
m.el...@mayn.de

Re:SQL-Server 6.5 (German) / BDE5 (German) and datetime-fields


Thomas,
1.Make sure that in the SQL-Server your login too uses the german language.
The language settings of server and login must match.
2.Further there is a WINDBVER.EXE in your local MSSQL directory where you
can uncheck a "Use international settings" checkbox. Usually this helps.
3.Be sure to use the latest SP for MSSQL.

--
-- Please do not respond to my mail adress.
-- I want to discuss this in this newsgroup only.

Bernd Maierhofer - dato Denkwerkzeuge
EDV-Projekte & Consulting

Thomas Friedmann <106333,2...@compuserve.com> schrieb in Nachricht
<01be39a9$3b082b80$640e07c0@pcthomas>...

Quote
>I'm using SQL-Server 6.5 (German) with Delphi 2.0 (German) and
>BDE/SQL-Links 5 (German) and have problems while editing datetime-fields.
>If i try to edit a datetime-field I get an errormessage from the SQL-Server
>telling me that he cannot convert to a datetime-value.

>Using SQL-Trace I can see that the BDE sends an SQL-statement with the date
>in the format DEC 12 1998.
>But my german Server expects the date in the format DEZ 12 1998
>(the shortnames for october,dezember in German are OKT,DEZ and not OCT,DEC)

>How can I make the BDE 5 (German) to send the shortnames for the month in
>german format ?. Or how can I make a German SQL-Server to Accept the
>US-English shortnames for month
>(SET LANGUAGE US_ENGLISH doesn't work)

>I have tried anything I knew including LongDateFormat,ShortDateFormat in
>Delphi and Dateformat and Language in BDE-Config.

>What is wrong ?

>--
>Thomas Friedmann
>i.d.e.e. Beratungsges. mbH
>106333.2...@compuserve.com

Re:SQL-Server 6.5 (German) / BDE5 (German) and datetime-fields


Hi Thomas!

Delphi/BDE uses the datesettings from the windows-systemsettings
(settings-ControlPanel,
ger: Einstellungen - Systemsteuerung).

To adapt the settings (MSSQL - Delphi) you can use the following
global variables (and some more - refer to online help) in your delphi-project:

   DateSeparator := '.';
   ShortDateformat := 'dd.mm.yyyy';
   LongDateformat := ....

HTH
Harald

Thomas Friedmann schrieb:

Quote
> I'm using SQL-Server 6.5 (German) with Delphi 2.0 (German) and
> BDE/SQL-Links 5 (German) and have problems while editing datetime-fields.
> If i try to edit a datetime-field I get an errormessage from the SQL-Server
> telling me that he cannot convert to a datetime-value.

> Using SQL-Trace I can see that the BDE sends an SQL-statement with the date
> in the format DEC 12 1998.
> But my german Server expects the date in the format DEZ 12 1998
> (the shortnames for october,dezember in German are OKT,DEZ and not OCT,DEC)

> How can I make the BDE 5 (German) to send the shortnames for the month in
> german format ?. Or how can I make a German SQL-Server to Accept the
> US-English shortnames for month
> (SET LANGUAGE US_ENGLISH doesn't work)

> I have tried anything I knew including LongDateFormat,ShortDateFormat in
> Delphi and Dateformat and Language in BDE-Config.

> What is wrong ?

> --
> Thomas Friedmann
> i.d.e.e. Beratungsges. mbH
> 106333.2...@compuserve.com

Re:SQL-Server 6.5 (German) / BDE5 (German) and datetime-fields


Thanks for your answer but it seems not to work.

These variables are already set but the dateformat in the SELECT preceding
the
attempt to edit doesn't change.
(long / Shortdateformat set to 'dd.mm.yyyy', SELECT shows ...DEC 12 1998)

Thomas Friedmann

Re:SQL-Server 6.5 (German) / BDE5 (German) and datetime-fields


Hi Thomas!

Additionally to the Long/Shortdateformat-Settings you have to change
the names of the months.

change the strings in this global variable
    (var ShortMonthNames: array[1..12] of string;)

e.g. like this:
    ShortMonthNames[1] := 'JAN';
    ShortMonthNames[3] := 'MAR';
    ...

This is one possible solution, but it is indeed strange that your german
server expects english/us datestrings. My german SQL-Server spoke german to
me... ;)

HTH
Harald

Thomas Friedmann schrieb:

Quote
> Thanks for your answer but it seems not to work.

> These variables are already set but the dateformat in the SELECT preceding
> the
> attempt to edit doesn't change.
> (long / Shortdateformat set to 'dd.mm.yyyy', SELECT shows ...DEC 12 1998)

> Thomas Friedmann

Re:SQL-Server 6.5 (German) / BDE5 (German) and datetime-fields


Thankyou for your answer but the problem is not located in Delphi.
In the meantime I solved my problem.
(look for a another message from me where i showed the solution)

Just so far: It is a problem of the SQL-Client, exactly of 2 DLL named
DBNMPNTW.DLL and NWTDBLIB.DLL which are in serveral versions
available (SQL-Server english, SQL-Server German, the various
servicepacks).
If you had installed an english SQL-client (like me), removed it and
installed an
german client then this date-problem will occur.

ATTENTION: latest news: This is also valid for SQL-server itself.
I Uninstalled an english SQL-server and tried to install the german
version.
--> Install hangs while creating the MSDB.
--> Solution. remove manually the above mentioned DLL's from
     \WINNT\SYSTEM32 before!! attempting an new Installation.
     (Install uses ISQL that uses these DLL's)

Harald Peki <h.p...@magnet.at> wrote in article
<369B0950.9AD8...@magnet.at>...

Quote
> Hi Thomas!

> Additionally to the Long/Shortdateformat-Settings you have to change
> the names of the months.

> change the strings in this global variable
>     (var ShortMonthNames: array[1..12] of string;)

> e.g. like this:
>     ShortMonthNames[1] := 'JAN';
>     ShortMonthNames[3] := 'MAR';
>     ...

> This is one possible solution, but it is indeed strange that your german
> server expects english/us datestrings. My german SQL-Server spoke german
to
> me... ;)

> HTH
> Harald

> Thomas Friedmann schrieb:

> > Thanks for your answer but it seems not to work.

> > These variables are already set but the dateformat in the SELECT
preceding
> > the
> > attempt to edit doesn't change.
> > (long / Shortdateformat set to 'dd.mm.yyyy', SELECT shows ...DEC 12
1998)

> > Thomas Friedmann

Other Threads