Avatar of R0y4L
R0y4LFlag for United Kingdom of Great Britain and Northern Ireland asked on

Adding table to dataset and binding to Data Grid view

Hello,

I have been working on my system and i would like to display data from table onto a data grid view on my form. I have wrote this code, and when I run it, no eeors are displayed, but when i refresh my dataset, no tables are added. I dont know where i made a mistake.

Thank you

R0y4L
ClashDatabaseSQLDataSet.Tables.Add("tbl" & ExamCode)
            DataGridView1.DataSource = ClashDatabaseSQLDataSet
            DataGridView1.DataMember = ("tbl" & ExamCode)

Open in new window

Microsoft DevelopmentVisual Basic Classic

Avatar of undefined
Last Comment
R0y4L

8/22/2022 - Mon
owndotcom

Add:

DataGridView1.DataBind();
ASKER
R0y4L

I have tried DataBind but Vb 2008 displays it as "DataBindings" not "DataBind" and it also says that a property is missing.
ASKER CERTIFIED SOLUTION
owndotcom

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
R0y4L

Thank you worked well. I had to pick out bits that i need and didn't need. Thank you
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck