E2003 Undeclared identifier: 'TStatementTypes'

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tcflam
Posts: 58
Joined: Tue 01 Jan 2013 10:48

E2003 Undeclared identifier: 'TStatementTypes'

Post by tcflam » Fri 27 Dec 2013 04:31

Hi,

I updated SDAC to new version 6.9.17 and re-complied my program in Delphi XE2. But it has an error "E2003 Undeclared identifier: 'TStatementTypes'" on "BeforeUpdateExecute" event. Is it a bug in new version.

Thanks!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: E2003 Undeclared identifier: 'TStatementTypes'

Post by AlexP » Fri 27 Dec 2013 07:14

Hello,

To solve the problem, you should add the DASQLGenerator module to the Uses section.

tcflam
Posts: 58
Joined: Tue 01 Jan 2013 10:48

Re: E2003 Undeclared identifier: 'TStatementTypes'

Post by tcflam » Mon 30 Dec 2013 01:23

Thanks! Problem solved when follow your instruction. But I don't know why the new version can't add it automatically? It lets me so trouble that I need to add it many forms manually. :shock:

AndreyZ

Re: E2003 Undeclared identifier: 'TStatementTypes'

Post by AndreyZ » Mon 30 Dec 2013 06:28

We will change this behavior in the next SDAC build, so there will be no need to add the DASQLGenerator unit to the USES clause.

Ludek
Posts: 296
Joined: Thu 12 Oct 2006 09:34

Re: E2003 Undeclared identifier: 'TStatementTypes'

Post by Ludek » Fri 10 Jan 2014 10:28

How should I write the ifdef to make the unit compilable with all sdac versions?
{$IF SDACVersion >= '6.90'} or anything like that?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: E2003 Undeclared identifier: 'TStatementTypes'

Post by AlexP » Fri 10 Jan 2014 11:54

Hello,

Yes, you can use the {$IF} directive to define the product version, but for correct comparison you should use the full product version. I.e., instead of 6.90 for the current version, you should use '6.9.17' .

P.S. As it was said above, we will change this behavior in the nearest version, and you won't need to attach additional modules for using TStatementTypes

Ludek
Posts: 296
Joined: Thu 12 Oct 2006 09:34

Re: E2003 Undeclared identifier: 'TStatementTypes'

Post by Ludek » Fri 10 Jan 2014 12:12

so this unit is needed only in 6.9.17 and higher versions?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: E2003 Undeclared identifier: 'TStatementTypes'

Post by AlexP » Fri 10 Jan 2014 14:04

Hello,

This module should be added only in the current SDAC version 6.9.17, we will fix this problem in the next versions - and you won't need to add the module.

Post Reply