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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:51:37+00:00 2026-05-13T07:51:37+00:00

I have a function for fetching data from a database via a dataset public

  • 0

I have a function for fetching data from a database via a dataset

  public DataSet getDataSet(string query)
  {
      DataSet ds = new DataSet();
      OleDbDataAdapter da1 = new OleDbDataAdapter(query, sybaseconn);
      OleDbCommand cmd1 = new OleDbCommand(query, sybaseconn);
      cmd1.CommandType = CommandType.StoredProcedure;
      da1.SelectCommand = cmd1;
      da1.Fill(ds, "tbl");
      da1.Dispose();
      da1 = null;
      SybaseconnClose();
      return ds;
  }

This works fine. The selected columns are “Nr” and “Remark”
I call this function in the next function.
My datagridview will bound with the dataset.

  private void LoadData()
  {
     dataGridView1.DataSource = null;
     Application.DoEvents();
     TTT3Dal awdal = new TTT3Dal();
     DataSet dsAWIA = awdal.getDataSet("select_tbl");
     awdal.dsTTT3 = dsAWIA;
     dataGridView1.DataSource = dsAWIA.Tables["tbl"].DefaultView;
     bindingSource1.DataMember = "tbl";
     //dataGridView1.DataBindings.Add("Text", bindingSource1, "nr"); 
 }

This works fine as well.
In the form I call the last function and the bindingNavigator.

  public Form1()
  {
     InitializeComponent();
     LoadData();
     bindingNavigator1.BindingSource = bindingSource1;
  }

Works fine BUT if I uncomment this line
//dataGridView1.DataBindings.Add(“Text”, bindingSource1, “nr”);
I get this error

Cannot bind to the property or column nr on the DataSource.
Parameter name: dataMember

I tried to solve this by adding the line

dataGridView1.DataMember = “tbl”;

But then I get the error

Child list for field tbl cannot be created.

Could someone please help me solve this and help me bind the datagridview to the bindingnavigator

  • 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-13T07:51:38+00:00Added an answer on May 13, 2026 at 7:51 am

    Never Mind, I solved it with the next code

      private void LoadData()
      {
         dataGridView1.DataSource   = null;
         TTT3Dal awdal              = new TTT3Dal();
         DataSet dsAWIA             = awdal.getDataSet("select_tbl");
         awdal.dsTTT3               = dsAWIA;
    
         BindingNavigator _bindnav  = new BindingNavigator(true);
         bindingSource1.DataSource = dsAWIA;
         bindingNavigator1.BindingSource = bindingSource1;
    
         dataGridView1.DataSource = bindingSource1;
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 430k
  • Answers 430k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Check these http://www.1stwebdesigner.com/.../stylish-jquery-tooltip-plugins-webdesign/ http://bassistance.de/jquery.../jquery-plugin-tooltip/ http://www.dreamcss.com/.../12-jquery-tooltip-for-web-developer.html http://onehackoranother.com/projects/jquery/tipsy/ (I use this) May 15, 2026 at 2:00 pm
  • Editorial Team
    Editorial Team added an answer Try this two queries for each table. SELECT month(date_field), SUM(cost_field)… May 15, 2026 at 2:00 pm
  • Editorial Team
    Editorial Team added an answer I will try your approach. I found a solution myself… May 15, 2026 at 2:00 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.