如何在vb 6模块中声明枚举? [英] How to declare enumeration in vb 6 module?

查看:356
本文介绍了如何在vb 6模块中声明枚举?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

另一个开发人员在VB6程序中有一个函数,该函数使用两个枚举作为参数.它们都来自称为ADODB的相同类或模块.但是它们的定义丢失了,因此代码无法编译.我正在尝试创建一个名为ADODB的模块,并将两个枚举添加到该模块中并尝试运行该函数.在声明了两个模块和值之后,我尝试运行该程序,但是vb6给我一个编译时错误,提示无效的外部过程".它突出了第一个枚举的第一个元素.我刚刚在新创建的模块中声明了枚举.
请帮忙!

There is a function in a VB6 program made by another developer which uses two enumerations as parameters. They both come from the same class or module called ADODB. But their definition is lost so the code won''t compile. I''m trying to create a module called ADODB and add the two enums to that module and try to run the function. After declaring the two modules and values I try to run the program but vb6 give me a compile time error saying "Invalid outside procedure". It hilights the first element of the first enumeration. I just declared the enums in the newly created module.
Please help!!!

推荐答案

ADODB似乎是Microsoft提供的用于DB访问的类.您的旧开发人员真的定义了另一个同名类吗?如果您有使用枚举的代码,则除非在外部DLL(例如MS DLL)中使用它,否则是否应在该代码上进行定义?
ADODB seems to be the class from Microsoft for DB access. Did your old dev really define another class with the same name ? If you have the code that uses the enum, shouldn''t it be defined on that code, unless it''s from an externall DLL, such as a MS one ?


请确保ADO已安装,然后您可以引用它.

请从Microsoft支持中查阅此文档. Clickey [ ^ ]
Make sure that the ADO is installed and then you can reference it.

Check out this documentation from Microsoft support. Clickey[^]


这篇关于如何在vb 6模块中声明枚举?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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