亚音速连接和数据集
如果使用亚音速,我知道你必须关闭数据读取器。但是如果您从存储过程中取回数据集怎么办?你能关闭什么? 所以,如果是这样的 -
SubSonic.StoredProcedure sp = SubSonic.StoredProcedure;
DataSet ds = DataSet;
ds = sp.GetDataSet;
完成后我要关闭什么?我认为数据集不能关闭,对吗?这是 Subsonic 2.x
抱歉,如果这已经发布了,我尝试早些时候发布但收到错误消息,然后找不到它,所以我再试一次。
If using subsonic, i know you hav to close a datareader. but what if you get a dataset back, from a stored procedure? What can you close?
So if its like this -
SubSonic.StoredProcedure sp = SubSonic.StoredProcedure;
DataSet ds = DataSet;
ds = sp.GetDataSet;
What do i close when done? I don't think dataset can be closed, right? This is Subsonic 2.x
Sorry if this was posted already, i tried to post earlier but got error message, and then couldnt find it so am trying again.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
执行存储过程时会建立连接。在建立连接并将数据拉入数据集对象后,SubSonic 将自动关闭连接。无需手动关闭任何内容。
The connection is made when the sproc is executed. After it makes the connect and pulls the data in to the dataset object the connection is automatically closed by SubSonic. No need to close anything manually.