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

  • SEARCH
  • Home
  • 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 9288939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T20:01:52+00:00 2026-06-18T20:01:52+00:00

I have a database that currently has nothing in it and I’m trying to

  • 0

I have a database that currently has nothing in it and I’m trying to create and save the first record, but end up getting an error that says “There is no row at position 0.”

What I’ve done is instead of having a textbox that allows a user to select a shipper or receiver name, I’ve pulled those out and put in comboboxes that I’ve bound to the appropriate field in two other databases (shippers.mdb and receivers.mdb).

So, on clicking the “save” button, I want to save the selecteditems (saved to strings) from those comboboxes to each column cell in the database that I want. However, the system isn’t letting me save the record at all. I’ve been trying to figure out how to save the information for the “current” record being edited or entered so for some reason I’ve decided to use (0), thinking that might work but it seems that isn’t right. Here is the code:

Private Sub Button16_Click_1(sender As System.Object, e As System.EventArgs) Handles Button16.Click

        Me.OrdersDataSet.orders(0).orderstatus = ComboBox13.SelectedItem.ToString()
        shipper1 = ComboBox8.SelectedItem.ToString()
        Me.OrdersDataSet.orders(0).SHIPPER1 = shipper1
        RECEIVER1 = ComboBox9.SelectedItem.ToString()
        Me.OrdersDataSet.orders(0).RECEIVER1 = RECEIVER1
        billtoacct = ComboBox7.SelectedItem.ToString()
        Me.OrdersDataSet.orders(0).BILLTOACCT = billtoacct
        driverassigned = ComboBox10.SelectedItem.ToString()
        Me.OrdersDataSet.orders(0).DRIVERASSIGNED = driverassigned
        truckassigned = ComboBox11.SelectedItem.ToString()
        Me.OrdersDataSet.orders(0).TRUCKASSIGNED = truckassigned
        trailerassigned = ComboBox12.SelectedItem.ToString()
        Me.OrdersDataSet.orders(0).TRAILERASSIGNED = trailerassigned

        Me.Validate()
        Me.OrdersBindingSource.EndEdit()
        Me.TableAdapterManager12.UpdateAll(Me.OrdersDataSet)
    End Sub

What should I be using instead because I can’t seem to find something to let me save (or substitute) the combo box items for the current record? I did check in the table adapter that the CRUD is there and I went through to make sure it’s set up to fill, update, etc.

Thanks for having a look.

  • 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-18T20:01:53+00:00Added an answer on June 18, 2026 at 8:01 pm

    Give this a shot…. PUT ALL OF THIS IN YOUR BUTTON CLICK EVENT AND CHANGE AS NEEDED…

    Dim customerOrders As DataSet = New DataSet("CustomerOrders")
    Dim ordersTable As DataTable = customerOrders.Tables.Add("Orders")
    
    'ADD YOUR COLUMNS YOU NEED TO...'
    ordersTable.Columns.Add("OrderQuantity", Type.GetType("System.Int32"))
    ordersTable.Columns.Add("CompanyName", Type.GetType("System.String"))
    
    'AND WHATEVER ELSE YOU NEED TO ADD, CHANGE AS NEEDED'
    
        ' Add YOUR ROWS to those columns for the datatable.
    ordersTable .Rows.Add(25, "Indocin")
    ordersTable .Rows.Add(50, "Enebrel")
    ordersTable .Rows.Add(10, "Hydralazine")
    ordersTable .Rows.Add(21, "Combivent")
    ordersTable .Rows.Add(100, "Dilantin")
    

    Then you have your dataset with the table and your data to set to your table adapter manager

    Thanks!

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

Sidebar

Related Questions

We have an application that has a database full of polygons (currently stored as
I have a database that is currently sharded. This is the first time that
I'm trying to normalize a mysql database.... I currently have a table that contains
I have a database that has 16 tables, but only four are relevant to
I have a database that contains data for many clients. Currently, we insert tens
I currently have a Postgres 8.4 database that contains a varchar(10000) column. I'd like
i have DataBase function that calculate distance by coordinates CREATE OR REPLACE FUNCTION distance(lat1
I have a database that has around 10k records and some of them contain
I have a database that has a table email_eml that stores 3 attributes name_eml,
I have a core data setup that has 2 database entities. For the sake

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.