CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: help with ado

  1. #1
    Join Date
    Apr 2014
    Posts
    2

    help with ado

    hi everyone

    so, i have created a kind of transaction program(whether withdraw or deposit) and i have used ado to link the database with the program.

    the thing is that, on one form, when the user makes a transaction and click the print button, the program should save the newrecord and go to the other one. another problem is that in the transactionID field the data type is autonumber and thus should automatically increment. on the same form, when i leave or go to the mainmenu, the databse should be saved so that i can produce report afterwards.

    i dont know how to do all this as i'm a student who has just began to just vb 6.0

    the database is in .mdb and the table linked with the form above is tbltrans with fields: TransactionID(Autonumber),TransactionType,Quantity (Rs),TransactionDate,Notes,CustomerID
    the form has AdoBank,cmdprint,cmdMainMenu

    i would be glad that someone experienced help me for this program. if you need more information or the form or database please ask me. if you need to talk in private i can give you my facebook.

    thanks in advance,
    xavier.

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: help with ado

    You would use the .Update method to commit the changes to the database.
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Apr 2014
    Posts
    2

    Re: help with ado

    Quote Originally Posted by DataMiser View Post
    You would use the .Update method to commit the changes to the database.
    i dont know how to do it i have designed the form and coding for other buttons?

  4. #4
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: help with ado

    There is a handy dandy little wizard [data form wizard] that will create a form for you complete with buttons and code that you could look at.
    There are about a million samples on the internet of how to do simple data operations with ADO

    But as I said the .Update method does this, that is about as simple as it gets. Have you tried it?
    Always use [code][/code] tags when posting code.

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

Featured