2
Answers

Handling Multiple Tables in Typed Dataset

mspadam

mspadam

21y
2k
1
Hi, How will i create and fill data in Typed Dataset containing more then one table?..How will i populate the respective table involved in the SQL Query? For example in my Typed Dataset i have 2 tables Employee and Department table. I'm fetching the data from both the tables in the sql query. How will i use DataAdapter to fill both the tables in the Typed DataSet? regards, Manpreet
Answers (2)
0
Javeed M Shaikh

Javeed M Shaikh

NA 7.8k 69.7k 12y
now sure if this is what you are looking for...

ButtonAddOrder_Click(...) 
THIS IS THE CODE I HAVE: StreamWriter myWriter new StreamWriter("customer.txt"); MyWriter.WriteLine(txtName.Text); MyWriter.Close(); 

If(addOrder == DialogResult.yes) 
{ why dont you call a function here...like myfunc() } 

}

Myfunc()
{
 DO COMMON TASK HERE
}
Accepted
0
Javeed M Shaikh

Javeed M Shaikh

NA 7.8k 69.7k 12y
great that it worked for you, also you are not stupid ; any question big or small is legit.
0
Dillon Goeda

Dillon Goeda

NA 22 6.8k 12y
I think I know what you mean... I Create a Function or Procedure then call it in both the button and if statement!!! Thanx man!!! Lol, I'm stupid....
0
Javeed M Shaikh

Javeed M Shaikh

NA 7.8k 69.7k 12y
Hi Dillion,

you question is not clear, may be you can elaborate more or give us some examples. For what i understand is you want to write a common routine and you want to call that on any event, like button click, etc. So I am not sure if you just create a Sub/Function and pass the object as the parameter and run your routine based on the object's decision.