Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
OPEN DATABASE doesn't necessary make the opened database current. Try inserting SET DATABASE TO MyDBC before the VALIDATE DATABASE command.
HTH
>It is working in some cases.
>I have an an application where are open two databases at the same time (one is a common database -this is open always; and the other is a project database a user can choose what he needs). When the system starts the user is choosing one of the project database. So if I want to validate the common database I can open exclusively and this is working, if I choose an another project database (not that one what I choosed already at system startup) it is working fine, but if I want to validate the database what I choose at the system startup I can not open exclusively. I do not know what can be the problem.
>The procedures are the follows:
>I start the form where the user can select the databases and the tables from a menu procedure. I created a public variable to store the selected databases, tables etc. I release the form and in a function I have the real code.
>
>here is the code what I use
>if tlValidDatabase
> if tcSelectDatabase = "DATA\COMMON.DBC"
> close databases all
> open database data\common excl
> validate database
> wait get_text("any_key") timeout 5
> else
> close databases all
> open database &pcSelectDatabase excl
>HERE IS THE PROBLEM IF PCSELECTDATABASE IS THE SAME WHAT I OPENED AT SYSTEM STARTUP
> validate database
> wait get_text("any_key") timeout 5
> endif
> close databases all
> open database data\common
> lcDatabase=goprogram.cDatabase
> open database &lcDatabase
> set database to &lcDatabase
>endif
>
>I hope you can understand my english and you can help me!!
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement