Re: Confusion about database updates

From: David Harper (devnull_at_obliquity.u-net.com)
Date: 04/12/04

  • Next message: Mark Scott: "Re: Connecting to MySQL on a Linux box from Borland JBuilder Foundation X"
    Date: Mon, 12 Apr 2004 18:47:29 +0100
    
    

    Burhan Khalid wrote:
    > The problem here is that the primary key, which is auto incremented,
    > is part of the printed record for each transcation.
    >
    > Consider an invoicing application. The primary key would be the
    > invoice number. So when a customer requests a printed invoice, we
    > have to generate an invoice number.

    Here's a possible solution, which doesn't depend upon your sales people
    being able to connect to the master database at your head office at all
    whilst they are travelling and making sales.

    I'm guessing that your sales people have laptops. You can run a MySQL
    server on a laptop running Windows. Design your application so that it
    stores invoice information to the MySQL server on the laptop. That way,
    all of the transactions stay in the laptop.

    Also, give each of your sales people a unique username, and require them
    to "login" whenever they start up the client application. Their username
    is logged to the laptop's database as part of the invoice information.

    When your sales people visit your head office, they run a second
    application which transfers all of the new invoices from the MySQL
    database on their laptop to the master MySQL database.

    > Thank you for your suggestions though, I appreciate your time

    You're very welcome. We're here to help :-)

    David Harper
    Cambridge, England


  • Next message: Mark Scott: "Re: Connecting to MySQL on a Linux box from Borland JBuilder Foundation X"

    Relevant Pages

    • Re: tracking inventory
      ... Just to expand on the last note about the sales sheet; ... adjusting inventory levels to improve cash flow. ... after filling in the invoice other things happen in the background. ... I have all the products on one sheet with all information and a blank column ...
      (microsoft.public.excel.misc)
    • Re: tracking inventory
      ... As you learned, to set up the customer table effectively you should have one row per customer, with the various details in columns. ... Since you want the invoice to drive the sales table we will break tradition somewhat, and end up putting more information in the sales table than we might if we were building this in a proper database*. ... as well", by that I mean, initally I just wanted to keep track of inventory because our office is not in the same location as the warehouse, and sometimes the manual entries are not done after picking an order. ...
      (microsoft.public.excel.misc)
    • Re: Update problem
      ... Invoice Number. ... >> UPDATE Sales INNER JOIN MaxInvoiceDog ON Sales.= ... >> invoice for all dogs, then you need to join on Dog Number. ... >>> I am having problems setting my criteria in an update query. ...
      (microsoft.public.access.queries)
    • Re: Update problem
      ... If MaxInvoiceDog table already contains the data from the highest invoice ... If you want to update *all* sales records with the price from the max ... invoice for all dogs, then you need to join on Dog Number. ... > UPDATE Sales INNER JOIN MaxInvoiceDog ON Sales.= ...
      (microsoft.public.access.queries)
    • Re: Parsing problem
      ... > file I can upload into MySql ... Please design something more stable to receive the data you extract. ... Checking column 0 of each line for an account number. ... Checking column 1 for all other colums to see if there is a new invoice ...
      (perl.beginners)