On Tue, 23 Oct 2007 12:25:09 +0530, "Ajoy Khaund" <[EMAIL PROTECTED]> wrote:
>In the INIT of a form I need to check if the dbc can be opened exclusively.
>If Yes proceed else a message to try later as other users are logged in.
>I am not sure of this TRY CATCH snippet.
>
>Try
> Open Database mydata Exclusive
> Set Database To mydata
>Catch
> lcFlag = .T.
> =Messagebox("Other users are currently logged in.",64,c_messagetitle)
>Endtry
>If lcFlag = .T.
> Return .F.
>Else
> Pack Database
>Endif
>
>Can anyone just help me. Something similar in Vfp6 was not a problem. A
>direct rebuild with Vfp8/9 did not work well. I wonder why.
Unless it is declared "local", you must initialize
lcFlag = .f.
just before the "try" line.
--
Gianni
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.