Page 1 of 1

Date-Field is WideStrin and not ftDate

Posted: Wed 12 Jul 2017 19:20
by alk
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.

Re: Date-Field is WideStrin and not ftDate

Posted: Fri 14 Jul 2017 07:11
by azyk
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'.

Re: Date-Field is WideStrin and not ftDate

Posted: Fri 14 Jul 2017 17:53
by rafakwolf
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

Re: Date-Field is WideStrin and not ftDate

Posted: Mon 17 Jul 2017 08:22
by azyk
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