Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generating unique Order No
Message
 
 
To
19/06/2009 15:06:46
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01406619
Message ID:
01407263
Views:
32
>>Hi Hilmar,
>>
>>The application is already written, my task was just to write the orders import program to import orders from the mobile scanner. The problem I faced is that the tables have OrdNo, CustNo fields as PK (I assume), but how exactly they were generated I don't know. I'm afraid my introducing counters table (of course I started with the max numbers) may mess things up.
>
>I don't think adding an additional table will interfere with the other tables.

I think it may interfere with the application itself. I don't know how exactly they add new customers / orders. I searched the project before for OrdNo and I didn't find any insert command, so they may use APPEND BLANK and REPLACE. In this case the default() value is going to kick in and my number would be incrementing properly even if the application may insert wrong number.

But if the application will use INSERT command directly (or may be insert from memvar), in this case my counter would not be updated. This is what I'm afraid of.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform