Field.Size different when using 7.1.3.0 of dbexpsda40.dll

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
BenW
Posts: 9
Joined: Thu 14 May 2009 04:35

Field.Size different when using 7.1.3.0 of dbexpsda40.dll

Post by BenW » Fri 06 May 2016 05:08

Hi,

After upgrading from dbexpsda40.dll v6.3.5.0 to dbexpsda40.dll v7.1.3.0 the dataset field.size property behaviour has changed when pointing at a nvarchar column.

When connecting to a nvarchar(5) column with v6.3.5.0 of the dll the field.size is reported as 5 but when connecting with v7.1.3.0 of the dll the field.size is reported as 10.

Is this behaviour expected?

I'm connecting using the following parameters

Code: Select all

  Connection.DriverName := 'DevartSQLServer';
  Connection.Params.Values['HostName']          := EdServer.Text;
  Connection.Params.Values['DataBase']          := EdDatabase.Text;
  Connection.Params.Values['LibraryName']       := 'dbexpsda40.dll';
  Connection.Params.Values['VendorLib']         := 'sqlncli';
  Connection.Params.Values['GetDriverFunc']     := 'getSQLDriverSQLServer';
  Connection.Params.Values['BlobSize']          := '-1';
  Connection.Params.Values['LongStrings']       := 'True';
  Connection.Params.Values['EnableBCD']         := 'False';
  Connection.Params.Values['FetchAll']          := 'True';
  Connection.Params.Values['TrimFixedChar']     := 'True';
  Connection.Params.Values['ParamPrefix']       := 'True';
  Connection.Params.Values['OS Authentication'] := 'True';
  Connection.Params.Values['UseUnicode']        := 'True';
I have a sample executable and project source code that shows the behaviour ready to send if needed.

Thanks.

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

Re: Field.Size different when using 7.1.3.0 of dbexpsda40.dll

Post by azyk » Fri 06 May 2016 08:05

Please send the source code sample to andreyz*devart*com and specify the full version of the used RAD Studio.

BenW
Posts: 9
Joined: Thu 14 May 2009 04:35

Re: Field.Size different when using 7.1.3.0 of dbexpsda40.dll

Post by BenW » Mon 09 May 2016 21:59

Thanks, I've sent the sample code to andreyz*devart*com. I had to use a web based email as out internal mail filter didn't like the dbexpress dlls in the attachment.

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

Re: Field.Size different when using 7.1.3.0 of dbexpsda40.dll

Post by azyk » Tue 10 May 2016 08:44

Thank you for the sent sample. We have reproduced this issue. We will investigate it and inform you as soon as we get any results.

lgh
Posts: 5
Joined: Wed 06 Aug 2014 17:28

Re: Field.Size different when using 7.1.3.0 of dbexpsda40.dll

Post by lgh » Tue 19 Jul 2016 16:54

I'm seeing the same problem with the 7.2.4 driver. Is there a fix forthcoming? We can't release with this new driver, but we need the fix for "Bug with AV on calling TSQLDataSet.Close is fixed".

-Lonny

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Field.Size different when using 7.1.3.0 of dbexpsda40.dll

Post by ViktorV » Wed 20 Jul 2016 08:15

We will continue investigation of the behavior of dbExpress driver for SQL Server and inform you as soon as we get any results, but we can't tell any timeframe at the moment.

lgh
Posts: 5
Joined: Wed 06 Aug 2014 17:28

Re: Field.Size different when using 7.1.3.0 of dbexpsda40.dll

Post by lgh » Wed 20 Jul 2016 15:52

Was there a change perhaps to use the CHARACTER_OCTET_LENGTH instead of CHARACTER_MAXIMUM_LENGTH from the metadata table, INFORMATION_SCHEMA.COLUMNS?

For NVARCHAR fields, the value in CHARACTER_OCTET_LENGTH is double the value CHARACTER_MAXIMUM_LENGTH. For VARCHAR fields they are the same.

The octet length is the number of bytes, whereas maximum length is the number of characters. They are not the same for NVARCHAR which is designed to store Unicode.

BenW
Posts: 9
Joined: Thu 14 May 2009 04:35

Re: Field.Size different when using 7.1.3.0 of dbexpsda40.dll

Post by BenW » Fri 22 Jul 2016 01:14

Hi, Just registering that this is still an issue for me too...

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Field.Size different when using 7.1.3.0 of dbexpsda40.dll

Post by ViktorV » Mon 25 Jul 2016 13:09

We have already fixed this issue, the fix will be included in the next dbExpress driver for SQL Server build.

Post Reply