Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sqlpassthrough connection
Message
 
 
À
06/09/2002 04:55:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00697399
Message ID:
00697431
Vues:
17
>Hi,
>
>We have an existing system which was developed in traditional native foxpro syntax, Appending, deleting and modifying records.
>
>I created a system to that will serve as a tool to modify certain records in the old system. I used sqlpassthrough commands to query a certain table. The problem is if a user added a record in the old system, the query in the new system does not include the latest record that was created in the old system.
>
>I discovered that by closing the new system and reopening it again then executing the query will then have the correct set of data or records needed.
>
>Is there a way on how to refresh the DSN connection? programmatically?

Assuming the new record has been committed to the table, you should be able to see new records via the current connection. If it is that critical that you know this, you could always start the session with a SELECT COUNT(*) FROM MYTABLE. Then when you need to know if new records were added, issue the SELECT COUNT again. Of course, this only works if now records were deleted or recalled to give you false information.

Another way is if the table has a PK, you can store the current PK to a variable, then check to see if the PK has incremented or if a larger PK has been added to the table.

Please don't take this as flippant, but why would anyone need that level of detail unless it is for reporting or statistical purposes?
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform