After upgrading from 8.1.7 to 8.2.9 EmptyString is Undefined Identifier

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
brace
Posts: 225
Joined: Wed 14 Feb 2007 08:26

After upgrading from 8.1.7 to 8.2.9 EmptyString is Undefined Identifier

Post by brace » Thu 31 Jan 2019 11:36

I just upgraded from SDAC 8.1.7 to 8.2.9 and after build i get
E2003 Undeclared identifier: 'EmptyString'

The code I maintain is pretty old, did you remove EmptyString? Is it safe I declare a global const

const
EmptyString = '';

or not?

Removing EmptyString is a known breaking change? Why it is not listed in history?

Thanks.

brace
Posts: 225
Joined: Wed 14 Feb 2007 08:26

Re: After upgrading from 8.1.7 to 8.2.9 EmptyString is Undefined Identifier

Post by brace » Fri 01 Feb 2019 10:04

After reinstalling 8.1.7 I noticed that in fact EmptyString is a constant resolved like this

EmptyString = '' from System.string

but after installing 8.2.9 somehow this is not resolved anymore.

It seems that adding a global constant (in a unit where i define common things) bypasses the problem, but i'd like to have a comment from your side to confirm this behavior.

brace
Posts: 225
Joined: Wed 14 Feb 2007 08:26

Re: After upgrading from 8.1.7 to 8.2.9 EmptyString is Undefined Identifier

Post by brace » Fri 01 Feb 2019 11:03

I add more details:

with SDAC 8.1.7 I see:
Image

while with SDAC 8.2.9 (without any other code change):
Image

This is what i experience.

It seems that somehow upgrading from 8.1.7 to 8.2.9 EmptyString does not work anymore.

Since EmptyString does not exist in Delphi RTL I feel like SDAC up to now made it work.

I use Delphi 10 Seattle.

Thanks.

brace
Posts: 225
Joined: Wed 14 Feb 2007 08:26

Re: After upgrading from 8.1.7 to 8.2.9 EmptyString is Undefined Identifier

Post by brace » Fri 01 Feb 2019 11:10

I add one last thing i noticed:
by seraching in source code (i have SDAC with source code even if i usually i use the simple installer) i realize that in 2 units you define EmptyString, in particular i see it in unit VirtualTable and SqlClasses.pas

Still i do not understand why the compiler shows "System.Classes".

Thanks.

brace
Posts: 225
Joined: Wed 14 Feb 2007 08:26

Re: After upgrading from 8.1.7 to 8.2.9 EmptyString is Undefined Identifier

Post by brace » Mon 04 Feb 2019 08:48

Last message from my side:

I finally realized tha you removed EmptyString from SDAC (from version 8.2.8 or 8.2.9 i did not check when but i realized it is in 8.2.8), either by mistake or it was your choice.

Since EmptyString is a simple constant defined as '' and since i was using it only in one unit i simply stopped using it and replaced it with ''

I don't need a reply but you can consider reviewing the fact that apps built with SDAC "stopped having access to EmptyString constant from 8.2.9". Thanks.

Stellar
Devart Team
Posts: 334
Joined: Tue 03 Oct 2017 11:00

Re: After upgrading from 8.1.7 to 8.2.9 EmptyString is Undefined Identifier

Post by Stellar » Mon 04 Feb 2019 10:31

After refactoring, the EmptyString constant was moved to the SqlClasses.pas module.
You can add the SqlClasses module and use the EmptyString constant as before.

Post Reply