|
-
March 19th, 2003, 02:57 PM
#1
Using a DataSet object as a return parameter
Hey all,
Im new to c# so bear with me. I searched the forum and couldn't find the answer to this question, so any help would be appreciated. I have a little function I use called MakeDataSet, in which I return a dataset from a passed in sql statement. I set a DataSet equal to the method call from where I call the function,
oDataSet = MakeDataSet(sSQL); for example. Here is my problem, when I go to close oDataSet, it tells me that I already have a DataSet open on the current connection and I must close it first. I assume its talking about the DataSet in the MakeDataSet function. But I obviously cant close that before I return the DataSet or Ill just end up with a closed DataSet before I begin my logic. What am I doing wrong here?
Thanks so much,
Ryan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|