Undeclared identifier: 'TConnLostCause'

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
MartyN
Posts: 7
Joined: Wed 25 Apr 2012 21:09

Undeclared identifier: 'TConnLostCause'

Post by MartyN » Thu 12 Jul 2012 21:05

My database connects just fine.
However, We are working on a maintenance update routine for our application and in doing this we need to knock users off the server and I was hoping to use this event to trigger a nice message and also give a connection retry. But when I compile I get Undeclared identifier: 'TConnLostCause'. When I follow this back I can find it in the MEMDATA unit and even added the path to the source file in my search path and still get this error.
The TRetryMode I can ctrl-right click and it takes right to it but not TConnLostCause.

I also tried the OnError but er.InnerError does not exist either.

I'm using Delphi7 on a Win7 32bit and SQLServer 2008

Any help is much appreciated.

AndreyZ

Re: Undeclared identifier: 'TConnLostCause'

Post by AndreyZ » Fri 13 Jul 2012 08:33

Hello,

To solve the problem, you should add the MemData unit to the USES clause of your unit. You can find a note about that in the description of the OnConnectionLost event in the SDAC documentation.

MartyN
Posts: 7
Joined: Wed 25 Apr 2012 21:09

Re: Undeclared identifier: 'TConnLostCause'

Post by MartyN » Fri 13 Jul 2012 12:22

My bad. I thought I tried that. Thanks fo rthe info. It works now.

AndreyZ

Re: Undeclared identifier: 'TConnLostCause'

Post by AndreyZ » Fri 13 Jul 2012 14:02

It is good to see that this problem was solved. If any other questions come up, please contact us.

Post Reply