开发者

increase the amount of open dao recordsets in VB?

I've opened a dao recordset at a VB application. The problem is that I received an '3037' runtime error, this error says that I can't open any more tables or queries. So, I have to close some, but this doesn't seem to work开发者_如何学运维... Is there any way to increase the number of opened recordsets?

I use the next code to sort a FlexGrid table when I click on a column,

...
recordSet.Sort = recordSet.Fields(2).Name & " ASC"
Set Auxrecordset = recordSet.OpenRecordset
recordSet.Close
Set recordSet = Auxrecordset
...

Thanks.

EDIT:

Does this bug affect this?


instead of re-sending the query just to sort the data, why don't you do something like this: http://www.vb-helper.com/howto_sort_flexgrid.html to sort the data on the screen in the grid instead?


Have you seen this kb article

http://support.microsoft.com/kb/165272

Looks like there might be a hotfix that's applicable, but you may already have it. Alternately, is it possible you're opening recordsets but not closing them somehow without realizing it (maybe because an error is being thrown and you're not reaching the close statement?)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜