Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Valid user input
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01173034
Message ID:
01173073
Views:
10
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform