Page 1 of 1

Undeclared identifier: 'TConnLostCause'

Posted: Thu 12 Jul 2012 21:05
by MartyN
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.

Re: Undeclared identifier: 'TConnLostCause'

Posted: Fri 13 Jul 2012 08:33
by AndreyZ
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.

Re: Undeclared identifier: 'TConnLostCause'

Posted: Fri 13 Jul 2012 12:22
by MartyN
My bad. I thought I tried that. Thanks fo rthe info. It works now.

Re: Undeclared identifier: 'TConnLostCause'

Posted: Fri 13 Jul 2012 14:02
by AndreyZ
It is good to see that this problem was solved. If any other questions come up, please contact us.