My Application uses a SQLite DB. The table in the DB is called tblLocations. For this assignment there is only one field that needs to be updated in tblLocations:
If holds a number that is associated to another field called LockerName(string) that is in the same table.
Within my application I use a TAdvListView component (delevoped by TMS), which is named lvDeviceListAdd. lvDeviceListAdd has a total of 10 columns which gets populated by a different table of the DB. However for this request there is only 1 column that you need to use as part of the updating process:
Column Name: Locker Name
Possible content for 'Locker Name':
1) Locker Name may be empty (null), and therefore lvDeviceListAdd will be completely empty.
2) Sometimes the Locker Name column will only contain one row with a value (one value; one record in the tblLocation that needs updating).
3) Other times Locker Name column will have the same value N times, where N = number of rows (e.g. could be 2 times, 10 times, 50 times, etc.).
4) Other times the Locker Name column has several rows with a different value N (rows) times.
5) Other times the Locker Name column has several rows with some having the same value while others will have a different value - N (rows) times.
Example 1: lvDeviceListAdd has no lockername listed.
Example 2: lvDeviceListAdd has LockerName containing 'BinA' and only one row.
Example 3: lvDeviceListAdd has LockerName containing 'BinA', 'BinB, 'BinC' and the consist of 3 rows.
Example 4: lvDeviceListAdd has LockerName containing 'BinA', 'BinB', 'BinA', 'BinX', ...'BinX123' and consist of 125 rows.
Note: lvDeviceListAdd does NOT have a column linked to LockerCount.
The DB has a field called 'LockerName', a string.
So the process is set by finding the match in column 7 of lvDeviceListAdd to the field name 'LockerName' of the table tblLocations and depending on the number of times the same value has been found, update the integer field called 'LockerCount' by 1 for each row matching.
Mention 'Apples and Oranges' at the beginning of your bid so I know you've read this entire request.
In general - I believe it will look like this:
UPDATE tblLocations SET LockerCount = LockerCount + 1 Where LockerName = [login to view URL][i].[login to view URL];
Set in some type of loop. At the end of the loop, perform a show message:
ShowMessage ('All Locker Counts have been updated.');
If lvDeviceListAdd is empty, do:
ShowMessage ('Nothing to Update.');
Your code will be tested before payment is submitted. Allow me the time to test before you ask for payment.
Được trao cho:
8 freelancer chào giá trung bình$123 cho công việc này
Apples and Oranges Hi, I can do it in 2 days within your budget. Please contact me and send your db and source app so I can start immediately. Thanks