Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I want an error for VFP Open dialog
Message
 
À
12/03/2004 16:40:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00885697
Message ID:
00885824
Vues:
31
Humm, i don't get what you say here... Here's the full example
=SqlExec(myHandle, "Select * from MyTable", "MyTable")
PlayWithMyTable()
ScanMyTable()

Function PlayWithMyTable
  *--- Do some stuff
  Use In MyTable
Endfunc

Function ScanMyTable
try
  *-- In the program here i expect the cursor to be there
  *-- but some other functions may have closed it
  Scan &&&& Open dialog box
    *--- Some code here

  EndScan
catch
...

EndFunc
>From the code shown, a SELECT is being issued, which will always go against a Fox table or cursor. If you want to get data from SQL Server, you need to use a remote view, SPT, or a Cursor Adapter and have the SELECT passed to SQL Server.
>
>
>>>Sounds to me that this isn't a VFP issue, but that the application architecture needs to be examined.
>>
>>Hi Craig,
>>
>>I created a wish in the wish list here for that a long time ago Wish#581 I don't agree with you that this an architecture problem. I am using SQL Server only and not DBF at all , so why should i prompt a user to choose a DBF???
>>
>>I would expect VFP to trow an error in a try-catch block if i attempt to use a inexistant ressource.
>>
>>
>>try
>>  *-- In the program here i expect the cursor to be there
>>  *-- but some other functions may have closed it
>>  Scan &&&& Open dialog box
>>    *--- Some code here
>>
>>  EndScan
>>catch
>>...
>>
>>
>>Why should i have to code if Used() i'm in a try...??
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform