Skip to content

How to use Data Sets?

Dinusha Gamage

Asked Apr 2, 2008, 2:15 AM EDT4 answers
Share
LinkedInX

Dear Friends,

Can anybody help me?

There are two tables which is having one to many relationship. So, how could you asign data in both tables into one dataset?

Thanks !

3 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0

    Call a stored procedure that does the following for example:

    Select * from table1 as tb1 inner join table2 as tb2 on tb1.id=tb2.tb1id

    it will then return you all the data from both tables based on the conditon is this what you were after?

    0
  • 0

    Dear Friend,

    Thanks for you reply and I created the query below and it is working properly. So how do you define a stored procedure with this and call that procedure in C# 2005?

    Select * from CM_CUSTHED as T1 inner join CM_CUSTDET as T2
    on T1.cust_code = T2.cust_code

    --Thanks ! --

    0
  • 0

     u write a stored procedure n call it use ur name:

    Select * from table1 as tb1 inner join table2 as tb2 on tb1.id=tb2.tb1id

    it will then return you all the data from both tables based on the conditon is this what you were after?

    0
  • 1 short reply
    • 0
      yes, Thank you.
      0