Community discussion forum

plz help me out...urgent

  • 0 month
    hi.. i have doubt regarding joins....here is my question... how to join two tables from the database and bind them to the gridview using joins in vb.net depending on userid please help me out...its urgent..
  • 11 months ago
    hi.....i hope this helps dim str as string="select * from table1 inner join table2 on table1.col1=table2.col1" dim da as sqldataadapter dim ds as dataset dim cmd as SqlCommand dim con as new sqlconnection(connectionstring) con .open() cmd = new SqlCommand(str, con) da =new sqldataadapter(cmd) ds =new dataset da.fill(ds) datagridview1.datasource=ds.tables(0)
  • 11 months ago
    dim str as string="select * from table1 inner join table2 on table1.col1=table2.col1" dim da as sqldataadapter dim ds as dataset dim cmd as SqlCommand dim con as new sqlconnection(connectionstring) con .open() cmd = new SqlCommand(str, con) da =new sqldataadapter(cmd) ds =new dataset da.fill(ds) datagridview1.datasource=ds.tables(0)

Post a reply

Enter your message below

Sign in or Join us (it's free).

We'd love to hear what you think! Submit ideas or give us feedback