请帮助vb6我有一个简单的错误 [英] please help at vb6 im having a simple error

查看:87
本文介绍了请帮助vb6我有一个简单的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您阅读本文时,您可能会笑..
即时通讯出现错误未定义用户定义的类型"
但问题是此语句的错误点
Public Con作为新的ADODB.Connection ...
即时通讯多次使用该代码,但是当我最近格式化我的电脑时,即时通讯有此问题
香港专业教育学院已经重新安装了我的vb6副本,但仍然相同
谁能帮我这个忙..
我很高兴也很感谢您的帮助..

you may laugh when you read this..
im having an error "user defined type is not defined"
but the problem is the error point at this statement
Public Con as New ADODB.Connection...
im using that code many times but when i format my PC recently im having this problem
ive already reinstall my copy of vb6 but still the same
could anyone help me on this..
i glad and thankful for your help..

推荐答案

在您的项目中添加对ado库的引用.

[从我的头顶上,还没有使用VB6进行aaaaaaaaages.]
Add a reference to ado library to your project.


[Off the top of my head, haven''t used VB6 for aaaaaaaages.]


看看:

this1

关于您的声明:
Public Con作为新的ADODB.Connection

如果您要定义新连接,则应为:

Dim Con作为新的ADODB.Connection

但是,如果它是功能的开始,则应为

公共函数Con()为ADODB.Connection
等等
Take a look at:

this

or

this1

Regarding your statement:
Public Con as New ADODB.Connection

If you''re trying to define a new connection it should be:

Dim Con as New ADODB.Connection

BUT, if it''s the start of a function, it should be

Public Function Con() As ADODB.Connection
etc


这篇关于请帮助vb6我有一个简单的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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