Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 923431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:11:32+00:00 2026-05-15T19:11:32+00:00

I have data source and table that I can bind to my controls and

  • 0

I have data source and table that I can bind to my controls and datagridview. I can add records to data table and i can view on datagridview but I can’t update and Delete records using datagrid. I have following code. If someone can help me i will be really appreciated.

Private Sub add_and_update()
        Dim con As VistaDBConnection
        Dim Cmd As New VistaDBCommand
        Dim constring As String
        constring = String.Format("Data Source =v_slot_database.vdb3", (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)))
        con = New VistaDBConnection(constring)
        con.Open()
        Dim metertable As DataTable = Me.DataSet1.Tables.Item("tbl_meter")
        Dim row As DataRow = metertable.NewRow()
        row.Item("CDate") = txtdate.Text
        row.Item("Machine_No") = txtno.Text
        row.Item("Turnover") = txtturnover.Text
        row.Item("Total Win") = txttotalwin.Text
        row.Item("Games Played") = txtgamesplayed.Text
        row.Item("Credit In") = txtcreditin.Text
        row.Item("Bill In") = txtbillin.Text
        row.Item("Cancel Credit") = txthandpay.Text
        metertable.Rows.Add(row)
        Me.DataSet1.tbl_meter.AcceptChanges()
        Me.Tbl_meterTableAdapter.Update(Me.DataSet1.tbl_meter)
        clear_fields()
        con.Close()
        con = Nothing
    End Sub

 Private Sub clear_fields()
        Me.txtno.Text = "0"
        Me.txtturnover.Text = "0"
        Me.txttotalwin.Text = "0"
        Me.txtgamesplayed.Text = "0"
        Me.txtcreditin.Text = "0"
        Me.txtbillin.Text = "0"
        Me.txthandpay.Text = "0"
        Me.txtno.Focus()
    End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:11:33+00:00Added an answer on May 15, 2026 at 7:11 pm

    I start to give answer to myself. 🙂 I found reason. There was no primary key on my tables. I added and the problem is solved.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list view binded to a data source. How can I enable
I have a Data Class called MyTable, and the source property is TABLE (table
I have a data source with about 2000 lines that look like the following:
I have a ASPXShceduler binded with object data source. It work fine, but when
I hope somebody can help me here, I have a table that has the
I am using Excel 2010. I have a monthly data table that looks similar
My app contains 1 list view, data source is 1 sqlite table, when i
I have a simple gridview: A sql datasource to bind data from table data
I have a table that loads new data every day and another table that
I have a data source I'm working with in Python. I'd like to save

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.