Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enable to erase table that have been accessed thruw ADO
Message
De
16/06/2000 14:22:19
 
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00380925
Message ID:
00381570
Vues:
14
>I'm using ADO 2.5 to connect to a Visual FoxPro 6.0 database using the ODBC foxpro pilot on a Windows 2000 system.
>
>Let's say that the database name is MyDB and that I want to retrieve datas from a table named MyTable. Of curse I've created a valid connection object and a recordset to put the datas in it.
>
>I've also create a FoxServer.FoxApplication object to execute some commands with the datas that I could not perform with the Foxpro ODBC driver.
>
>Once I've finish getting the datas I'm closing the recordset with recordset.close method. The connection object remains open thuw because it is of a different scope than the recordset and I will need it later on. There is also some chances that other recordset are connected to other tables thruw that same connection.
>
>After closing the recordset I would like to simply delete the table from the database using the FoxApplication.DoCmd method :
>
>FoxApplication.DoCmd "OPEN DATABASE MyDB"
>FoxApplication.DoCmd "REMOVE TABLE MyTable DELETE"
>
>But each times I'm performing that last operation I get an "Permission deny" error message box in foxpro.
>
>The SET EXCLUSIVE property have been set to OFF in the foxpro applicaton instance. I cannot set it to ON and open MyDB because the database MyDB is shared betwen my ADO objects and the FoxServer objects.
>
>I really don't understand what is happening because normally the table MyTable should be free for deletion. It look like Windows or Foxpro still have the impression that the DBF file is linked to the recordset object.

Try DROP TABLE myTable. This works with the ODBC driver too. Check if you have set any persistent relations on the DBC to other tables. You would have to remove those first.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform