Welcome! Log In Create A New Profile

Advanced

MS SQL and Date values

Posted by Stefan Kern 
Stefan Kern
MS SQL and Date values
November 24, 2022 12:31PM
Dear Forum,

I need some help regarding the MS SQL Server.
I have a program (WD26) which was based on HF SQL Server.
I moved it to MS SQL for one specific customer and it works great in my test environment.

The program consists of an WD Desktop application and a WD Windows Service doing data transmission.
Desktop Application and Windows Service are different configs in the same project and share a lot of code.

The setup at customer side is as follows:

- Citrix Server having the desktop application installed
- Database Server running a MS SQL 2019 Server This server hosts a lot of other databases
- Virtual machine acting as server hosting the windows service.

The application running on the citrix works fine, the service running on the VM crashes.

The Code causing the error is used by the windows service and the desktop app.

The code reads a date-field from the MS SQL Server.
In the field is stored the date value “2099-12-31”, which is received as “20991231” in the desktop application, but it is received as '2099-255-02' in the service, which causes the crash on a later date operation.

So the same code consuming the same SQL Server receive 2 different values.

I think it is a setting somewhere on OLE DB driver level.
Does someone has an idea?

Thanks in advance.
pao
Re: MS SQL and Date values
November 24, 2022 12:45PM
The version of the SQLNCLI installed in the citrix is the same as the version in the VM running the service?
Check each OS to see what are the versions installed.

You can force the use of a specfic version in the extended information of the connection.
check in the help the possible values for the WD CLIENT VERSION.
[doc.windev.com]

Regards

Paulo Oliveira
Re: MS SQL and Date values
November 24, 2022 02:01PM
Hi Paolo,

thanks a lot.
I was not able to check on the production machines as I have always to ask for the customers IT for that, and it is more easy to get an appointment with the pope then with their IT.

But I was able to reproduce the error using the WD CLIENT VERSION parameter.

Thanks a lot!

You saved my day.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: