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 8894495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:30:43+00:00 2026-06-14T23:30:43+00:00

Trying to get this bit of code to enter a player name fill it

  • 0

Trying to get this bit of code to enter a player name fill it in the datarow then update it in the DB. It currentley updates in the datarow but I can not get the code right to update the DB. Could you please help cheers.

  Using da As OleDbDataAdapter = New OleDbDataAdapter("SELECT * FROM Team1", con)
            da.Fill(ds, "BPAWA")

            txtFirstName.Text = ds.Tables("BPAWA").Rows(0).Item(1)

            T1P1 = InputBox("Name of Player 1")

            ds.Tables("BPAWA").Rows(0).Item(1) = T1P1

            ds.Tables("BPAWA").AcceptChanges()
            ds.AcceptChanges()

            da.Update(ds, "BPAWA")
            MsgBox("Player 1 Added Successfully")
        End Using
  • 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-06-14T23:30:45+00:00Added an answer on June 14, 2026 at 11:30 pm

    You OleDbDataAdapter is not linked to an actual command neither you seem to have created the adapter in your code. See an example here

    Missing a line like this

    Dim da As OleDbDataAdapter = new OleDbDataAdapter(selectCommand, connection);
    

    so I could rewrite your code in this way (Avoiding the global variables)

    Private Sub btnLoad_Click(sender As Object, e As EventArgs) Handles btnLoad.Click
        Dim dbProvider As String = "PROVIDER=microsoft.ace.oledb.12.0;"
        Dim dbSource As String = "Data Source = C:\BP_Table_Project.accdb"
        Dim ds as DataSet = new DataSet()
    
        Using con As OleDbConnection = new OleDbConnection()
            con.ConnectionString = dbProvider & dbSource
            con.Open()
    
            MsgBox("Connection With Database Established", 0, "Database Connection")
    
            Using da as OleDbDataAdapter = new OleDbDataAdapter("SELECT * FROM Team1", con)
                Dim builder As OleDbCommandBuilder = New OleDbCommandBuilder(da)
                da.Fill(ds, "BPAWA")
                ......
    
                da.Update(ds, "BPAWA")
                MsgBox("Player 1 Added Successfully")
            End Using
            MsgBox("Connection With Database Closed", 0, "Database Connection")
        End Using
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone help me with this bit of code: http://jsfiddle.net/tVzq9/2/ I'm trying to get
I'm trying to get this bit of code in my cfscript tag to work.
I'm having a small bit of trouble trying to get this piece of code
I am trying to get this bit of JavaScript to run. I keep getting
Im trying to get this working but for some reason it's just not right.
I am trying to get this piece of code working in C#, what I
I've been trying to get this code to work to return a input number
I guess this would look a bit stupid, but I'm trying to find an
I am trying to use this bit of code: [[myUIView layer] addSublayer: layer]; [myScrollView
I've been trying to get this code to work for the past day whilst

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.