Date-Field is WideStrin and not ftDate

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
alk
Posts: 11
Joined: Sat 31 Dec 2005 13:35

Date-Field is WideStrin and not ftDate

Post by alk » Wed 12 Jul 2017 19:20

Hi,

using the latest sql-driver from April I found a problem with Date-Fields:
The resulttype is here ftWidestring and so I will run into a problem with StringToDate-Format (Db needs englisch Formatstring but I am working in the german schema).

Trying the latest MySQL-Driver the result is ftDate and everything is great. What can I do?

Best regards
Alexander

PS: I am working with D2010.

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Date-Field is WideStrin and not ftDate

Post by azyk » Fri 14 Jul 2017 07:11

The point is that standard OLEDB provider processes datetime2 fields as string fields. To solve the problem you should use the SQL Native Client provider. For this you should set the TSQLConnection.VendorLib property to 'sqlncli'.

rafakwolf
Posts: 8
Joined: Mon 13 May 2013 18:58

Re: Date-Field is WideStrin and not ftDate

Post by rafakwolf » Fri 14 Jul 2017 17:53

Same problem here but even changed to sqlncli got this error:

Code: Select all

SQL State: 1, SQL Error Code: 27, Level: 16, Procedure: , Line: 0
Registry information is corrupt or missing. Make sure the provider is installed and registered correctly.
And the sql native client is already installed.

Thanks

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Date-Field is WideStrin and not ftDate

Post by azyk » Mon 17 Jul 2017 08:22

To solve the problem, reinstall SQL Server Native Client on the client computer, where dbExpress driver for SQL Server is used.

If the error is still reproduced, provide the full versions:
- SQL Server Native Client on the client computer
- dbExpress driver for SQL Server
- OS on the client computer
- RAD Studio

Post Reply