VB中的内存问题 [英] Memory Issues in VB

查看:77
本文介绍了VB中的内存问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我再次被困在VB中。我认为,VB是你在任何时候都不能说的,因为我确信我已经完全掌握了它。无论如何,我的问题如下:


我在VB中创建一个程序

  • 从Oracle 9i数据库的表中获取记录。
    • 表中有一个名为amount的列,另一个名为product_code。我必须根据某些条件(业务逻辑)将每条记录中不同产品的金额相加。
    • 在MSHFlexGrid中显示结果
    • 查询需要花费很长时间(不少于10分钟)才能完成,因为它是一个庞大的数据库,它本质上是活的。这会导致用户烦恼。
    • 当将复杂查询发送到数据库执行时,程序本身变得不稳定且无响应。 DoEvents在这里无法提供帮助,因为它是单个查询语句,它会卡住而不是循环。

    推荐答案




    有了这么庞大的数据库,我是什么已发现的是存储过程。是答案。而不是将一些即席查询传递给服务器,只需创建一个存储过程,传递参数,并使其返回Recordset。

    由于SP'已编译,返回结果更快。


    问候

    Veena
    Hi,

    With such huge databases, what I have found is "Stored Procedures" are the answer. Instead of passing some ad-hoc queries to the server, just create a stored procedure, pass the parameter, and make it to return the Recordset.
    Since SP''s are compiled, the return results are faster.

    Regards
    Veena






    有了这么大的数据库,我发现的是存储过程。是答案。而不是将一些即席查询传递给服务器,只需创建一个存储过程,传递参数,并使其返回Recordset。

    由于SP'已编译,返回结果更快。


    问候

    Veena
    Hi,

    With such huge databases, what I have found is "Stored Procedures" are the answer. Instead of passing some ad-hoc queries to the server, just create a stored procedure, pass the parameter, and make it to return the Recordset.
    Since SP''s are compiled, the return results are faster.

    Regards
    Veena



    我也尝试过这种方式。它也有同样的问题。执行程序执行的时间,前端用户不知道后台发生了什么,他的工作完成了多少百分比以及剩余多少。


    I have tried it this way also. It also has the same problem. The time during which strored procedure is getting executed, the user at front-end gets no idea of what is going on in the background and how much percentage of his his job is completed and how much is remaining.




    肯定是与内存有关的问题。

    检查增加系统的虚拟内存..

    使用SP也会得到同样的内存问题......?


    问候

    Veena
    Hi,

    It sure is a Memory related problem.
    Check by Increasing Virtual memory of the system..
    With SP also you get the same memory problem...?

    Regards
    Veena


    这篇关于VB中的内存问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆