Question about a Type (Table)?

I have a project in VB 4 that contains this line:

Dim myTableCB As Table

When I open it up in VB 6 and try to compile this I get an error. It no longer recognizes Table as valid type.

I am assuming that a reference to a component or something like that must be missing. But how do I go about finding which Reference Table was part of?


rrr333222Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

EDDYKTCommented:
I believe you can check the project file: such as project1.vbp. You can open the project file by sending the file to notepad.
0
rmichelsCommented:
Table is probably part of DAO.  You need to add a reference to the Microsoft DAO object library.

Also the table object is an obsolete object in DAO.  It has been superceeded by a recordset object.

Using the OpenRecordSet method on a database object, you can create a table reference by supplying the proper constants.

db.OpenRecordset("tblName", dbOpenTable)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rmichelsCommented:
Also once you reference the DAO Library, Table should still be supported, but you should consider moving to the openrecordset call.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

rrr333222Author Commented:
rmichels

I have a refrence to DAO 3.6. In the orriginal VB 4 version ther DAO is 2.5 or something like that. Could this make a diference?

0
rrr333222Author Commented:
I tried removing the DAO 3.6 and replaced it with 2.5/3.0 3.5 none allowed for the Table type.
0
rmichelsCommented:
hmmm..you are right, 3.5 or 3.6 will not compile with the Table type.

But I just tried 2.5 and 2.5/3.0 compatibility DAO and was able to compile with the Table type.

Check again..if it doesn't work, reject my answer :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.