By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,684 Members | 1,309 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,684 IT Pros & Developers. It's quick & easy.

Help !

P: n/a
I have a function defined In a Class1.


Public Class1

Public Function GetData () as DataSet

******** Using SqlDatAdapter I fill the DataSet

******** It will return the Filled DataSet.

End Function

End Class

I have another Class which calls the GetData function of the first class.

Public Class2

Public Function UdateDatasetTODataBase()

Create Instance of the First class and Call the
GetData Function, which returns the DataSet.

'''''''' I want To Add/Update the Dataset and
reflect back to DataBase.. ****** How to Do this?????????????

End function

End Class

Using SqlDataAdapter this can be Done only if u fill the Dataset in the Same
Function, make Changes and Call the SqlDataAdapters Update method,

But I am filling the Dataset in Different function..

Is there anyway to assign already filled Dataset to SqlDataAdapter ?



Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a
Hi Gary,

Write a PutData method in Class1. The DataSet that you give to Class2 is
not a copy - it is the same one that Class1 already has.

Have you thought of inheriting Class1 <from> DataSet? Then it will <be>
the DataSet. ;-)

Nov 20 '05 #2

P: n/a
Hi Gary,

You have other replies but they have been misposted under a different
thread. Topic:
Re: Please help !, dated 25th, 9:01pm.


Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.