Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Valid user input
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01173034
Message ID:
01173073
Vues:
11
Thank you for your response.

That will work in most cases but if both users try to insert at the
same time the select won't return any record to each one.

It should be easier if I could assign one machine to each user but
that is not possible.

c.x.

>How do you know it's already working so it's a wrong entry? Because it fits in the current time?
>Do a query before inserting to see if the current time fits in a slot for the machine number you want.
>
>Something like
>nMachine = 1
>mytime = strtran(left(Time(),5),":","")
>cSQL = "select * from mytable where machine="+transform(nMachine);
>" and dt between StartTime and EndTime"
>or you can say dt < = EndTime and dt > = StartTime
>
>If you get a record returned then it's already in use.
>
>This assumes time in the current day, as per your data sample.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform