Page 1 of 1

Field.Size different when using 7.1.3.0 of dbexpsda40.dll

Posted: Fri 06 May 2016 05:08
by BenW
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.

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

Posted: Fri 06 May 2016 08:05
by azyk
Please send the source code sample to andreyz*devart*com and specify the full version of the used RAD Studio.

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

Posted: Mon 09 May 2016 21:59
by BenW
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.

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

Posted: Tue 10 May 2016 08:44
by azyk
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.

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

Posted: Tue 19 Jul 2016 16:54
by lgh
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

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

Posted: Wed 20 Jul 2016 08:15
by ViktorV
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.

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

Posted: Wed 20 Jul 2016 15:52
by lgh
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.

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

Posted: Fri 22 Jul 2016 01:14
by BenW
Hi, Just registering that this is still an issue for me too...

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

Posted: Mon 25 Jul 2016 13:09
by ViktorV
We have already fixed this issue, the fix will be included in the next dbExpress driver for SQL Server build.