Results 1 to 3 of 3

Thread: problem with interation between database and application

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    4

    Question problem with interation between database and application

    Hi every body

    I have written the code (in form 1) for an application which is a coffee vending machine. There are 5 warm drinks among which you ca choose and pay for with 4 kinds of coin. This application works fine. There is also a database for the application which has been coded in another form (form 2). There are 5 records in this database which are the same drinks in the application. By the database, you have the possibility to add, delete, edit the records and update them. All of this works great just inside the database. But: every change in the database in form 2 should be applied and transferred to the main application in form 1 ( to coffee vending machine). I have established the connection between the database and the application by:

    Private Sub UpdateControls()

    which exists in for 2 and will be called by update button. Considering all of this above, my problems are: (I have attached all of the files including the forms and the database in a zip file so that you can have a closer look at. see also some translations the words below.)

    1) whenever I edit the name a record in the database and update it, I expect that the inside-application caption of the same name as the record should be edited correctly. But instead, everything gets into a mess in the captions of of the drink buttons. When I try to edit once more, things get even worse.

    2) If I edit the name of a record, the order of the cations in the application changes alphabetically, while the prices below them remain fixed. So, the names of the drinks go to the wrong prices. The wanted form is that the price should be sticked to the same button all of the time.

    3) I don't really know how to connect every drink button and its properties to a certain record in the database, so that all of the time the recognize each other after editing, deleting and ... .

    4) when I close the application after editing something, and start again (all in VB), I see that the name of the captions of the drinks in the application have returned to the pre-edition situation, while the changes in the database are remained. I want the changes to be remained in the application too.

    I am a newbie to Visual basic. I appreciate any help .Thank you.

    I have attached all of the files including the forms and the database in a zip file so that you can have a closer look at. Some Transltions will help Dryck: drink, mynt: coin, betald: paid, växel: change)
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width