Steve,
>IOW if I hand the DataAdapter a *closed* connection, after calling the DataAdapter's Fill() method, the connection will again be closed. <Yep, that's the way it's supposed to work.
>>I've tried this, and no matter how I try to do it, the connection remains open until a) I explicitly call the Close() method of the connection object, or b) the connection object goes out of scope.<Hmmm ... how are you determining that the connection is still open?
~~Bonnie
>In reading Kevin McNeish's (excellent) book on .NET for VFP developers, I came across an issue that I'm having trouble with.
>
>On Page 210, Kevin states the following in a comparison of DataReaders and DataSets:
>
>"DataSets are connectionless by default—an initial connection is opened, all requested data is retrieved from the data source, and then the connection is automatically closed."
>
>I've been unable to observe this behavior.
>
>I asked Kevin about this recently, and he clarified saying that the SqlDataAdapter leaves the connection in the state in which it was found. IOW if I hand the DataAdapter a *closed* connection, after calling the DataAdapter's Fill() method, the connection will again be closed.
>
>I've tried this, and no matter how I try to do it, the connection remains open until a) I explicitly call the Close() method of the connection object, or b) the connection object goes out of scope.
>
>What am I missing/misunderstanding here?
>
>Thanks.