Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error 13 when running goMeta.oSDTMgr.OpenData()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Stonefield
Divers
Thread ID:
00598630
Message ID:
00601697
Vues:
22
>Hi Torgny.
>
>>But I have another problem, also appearing only with SDT6.0 not with 5.0. The following code worked fine in SDT5.0 but now I get an "File access is denied (Error 1705)" inside the OpenData-method.
>>
>>
 goMeta.oSDTMgr.OpenData(Allt(goApp.GetSetting(lcKey, DBC_NAME)+ DBC_NAME),.T.,.T.,.F.)

>> In SDT 5.0 it does not result in any error , it just return .F.. I run this in the startup of the app and if the database and all tables can be opened exclusive, I run goMeta.oSDTMgr.NeedUpdate() to check, but if .F. is returned (could be someone else running the app ) i skip the NeedUpdate().
>
>We changed error handling in SDT 5.1 to do a more complete job of reporting errors, and this was one of the effects. However, you can disable the display of the error dialog by setting goMeta.lSuppressErrors = .T.
>
>Doug

Should it be possible for the OpenData method to return .T. with the following call "goMeta.oSDTMgr.OpenData(ALLT(goApp.GetSetting(lcKey, DBC_NAME)+ DBC_NAME),.T.,.T.,.T.)" if I have the same application up and running in another instance with a lot of the tables open. In the following code OpenData method return .T. although several of the tables are open (shared) in another instance of the app. If I open up another instance of VFP and open any of the tables in exclusive mode, the NeedUpdate method returns .T. ??, so the OpenData method also here returns .T.. I thought that the OpenData method only should return .T. if all the tables marked as "Auto Open" could be opened exclusive.
      
LOCAL lcKey

IF UPPER(goApp.GetSetting("Data Settings", "Use Local Data", "YES")) == "YES"
lcKey = DBCLOCATION_LOCALKEY
ELSE
lcKey = DBCLOCATION_REMOTEKEY
EndIf

goMeta.lSuppressErrors = .T. && stänga av felmeddelanden från DBCXMgr

IF goMeta.oSDTMgr.OpenData(ALLT(goApp.GetSetting(lcKey, DBC_NAME)+ DBC_NAME),.T.,.T.,.T.)

*-- Disable all toolbars
IF TYPE("goApp.oToolbars") == "O"
goApp.oToolbars.SetEnabled(.F.)
ENDIF

IF goMeta.oSDTMgr.NeedUpdate()
IF MessageBox('Det finns tabell(er) i databasen som har felaktig struktur.' + CHR(13) + ;
'Vill du korrigera detta automatiskt ?', MB_YESNO + MB_ICONSTOP + MB_DEFBUTTON2,;
APPNAME_LOC) = IDYES

goMeta.oSDTMgr.Update('ALL')
ENDIF
ENDIF

IF TYPE("goApp.oToolbars") == "O"
goApp.oToolbars.SetEnabled(.T.)
ENDIF

ELSE
MessageBox('Kunde inte öppna databas med tabeller',MB_ICONSTOP)
ENDIF
goMeta.lSuppressErrors = .F. && aktivera felmeddelanden från DBCXMgr


/Torgny
/Torgny
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform