none
How to use form to update a database visual basic? RRS feed

Answers

  • Hello kofisee,

    Welcome to the ADO.NET Forum.

    Like Sheng Jiang said, I think you can use ADO.NET to do some updates to the database through Winform using VB.

    To summarize, you will need to complete these basic steps:

    1. Make sure your database is available and running on something like SQLExpress (or SQL Server).
    2. Create a WinForms application in Visual Studio for VB.
    3. Add a couple of TextBoxes representing the fields you want to update and a button to invoke an event for the update.
    4. In the Button's event handler connect to the database, read the TextBox.Text properties, and piece together a SQL Insert command, invoking the command.

    More information, you can see this workaround:

    http://www.developer.com/db/article.php/3802266/Updating-a-Database-from-WinForms-Controls-Old-School.htm

    I hoep this can help you. If you have any questions, please feel free to let me know.

     

    Have a nice day,


    Jackie Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, May 12, 2011 11:19 AM
    Moderator

All replies

  • You can not use a form to update a database.

    Try the ADO.Net forums under the Data Platform development category for options for updating database. This forum is for the class diagram editor.



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Monday, May 9, 2011 10:14 PM
  • Hello kofisee,

    Welcome to the ADO.NET Forum.

    Like Sheng Jiang said, I think you can use ADO.NET to do some updates to the database through Winform using VB.

    To summarize, you will need to complete these basic steps:

    1. Make sure your database is available and running on something like SQLExpress (or SQL Server).
    2. Create a WinForms application in Visual Studio for VB.
    3. Add a couple of TextBoxes representing the fields you want to update and a button to invoke an event for the update.
    4. In the Button's event handler connect to the database, read the TextBox.Text properties, and piece together a SQL Insert command, invoking the command.

    More information, you can see this workaround:

    http://www.developer.com/db/article.php/3802266/Updating-a-Database-from-WinForms-Controls-Old-School.htm

    I hoep this can help you. If you have any questions, please feel free to let me know.

     

    Have a nice day,


    Jackie Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, May 12, 2011 11:19 AM
    Moderator