Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't access selected table
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Can't access selected table
Divers
Thread ID:
00165302
Message ID:
00165302
Vues:
58
I have this code:
SELECT Users
lnUserKey = USERS.UserKey
SELECT DISTINCT operations.copname, als.opkey, als.UserKey, operations.cdir, ;
   operations.lMandCnum ;
   FROM als INNER JOIN operations ON als.opkey = operations.opkey;
   INTO CURSOR ops ;
   WHERE als.UserKey = lnUserKey

IF _TALLY > 0
   WITH THISFORM.Dvllistbox1
      .ENABLED = .T.
      .ROWSOURCE = "ops"
      .ROWSOURCETYPE = 2
      .COLUMNCOUNT = 4
      .COLUMNWIDTHS = '150,0,0,0'
      .COLUMNLINES = .F.
      .BOUNDCOLUMN = 2
   ENDWITH
ENDIF
The first time through it works fine. After it runs, the user has an option of pressing a button that calls up another modal form. When it comes back, it runs this code again because that other form might have changed the user access.

When it comes back, something has happened to the "ops" cursor. I try to USE it first before re-running the SQL, and it gives the title error. If I don't do that, it runs the SQL and creates the cursor again, and I can browse it, but when it gets to assigning the lbox's rowsource, it gives the error again.

Each of these forms has its own datasession and they're both modal.

Any ideas?

Thanks,

-Michelle
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform