Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REGISTRY QUESTION IN CONN TO VB6.0 .EXE FILE 1

Status
Not open for further replies.

TNN

Programmer
Sep 13, 2000
417
US
I copied over to another computer a small .exe program that I wrote. When I run the .exe file I get some errors as follows:

Run -Time error 339
"Component DBGRID32.OCX or one of its dependencies not correctly registered: a file is missing or invalid"

I copied the .ocx file over to the system directory but still get this error. Do I have to register it in the registry somehow? How??

Other error I get is when I start up..."Couldn't find installable ISAM"
I am using a schema.ini file and it is in place. What is that Installable ISAM and what do I do about it??

Any help is appreciated.
TNN, Tom
tnpayroll@truevine.net



TOM
 
Use Packaging and Distribution Wizard (under add-ins, if not visible use add-in manager) or download Microsoft Installer from MSDN. There are also a load of shareware/commercial installers out there on the web
Let me know if this helps
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
johnwm,

I used the Package and Distribution Wizard and created my diskettes. Loaded on other computer but get this error: "An error occurred while registering the file c:\windows\system\dbgrid32.ocx".

I verified that this file is in the system directory but seems to be some problem in getting it into the registry.
What could the possible problem be??

TNN, Tom
tnpayroll@truevine.net
TOM
 
[conehead] If you are not using the professional or enterprise version of VB then you do not have the license to distribute your program.

VBSlammer
redinvader3walking.gif
 
VBslammer,
I am in fact using the professional version of VB6.0.

Can anyone tell me what may possibly be going on??

Than You
TNN, Tom
tnpayroll@truevine.com
TOM
 
Try using REgsvr32 to manually register the offending OCX and see what's happening.

Does your install setup list include MDAC?

Missing installable ISAM usually comes from old or broken MDAC Let me know if this helps
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
I'm not sure what file the DBGrid32.ocx is dependent on but I opened the file with a COM viewer and saw a reference to a type library in C:\Windows\System\DBGrid32.oca

If that's not the problem, I'll bet you could resolve your problem by switching to the DataGrid control that ships with VB6. The DBGrid32.ocx is an older version 5.0 control. I've seen many articles about compatibility problems with this control, and resolutions involve upgrading to a newer control - such as in this article:

-----------------------------------------------------------

Cause
The DBGrid control is designed to work specifically in Microsoft Visual Basic. The DBGrid control utilizes functionality only exposed by Visual Basic's OLE control container.

Resolution
The DBGrid control is only fully functional when used inside Microsoft Visual Basic. Instead of using the DBGrid control, you can use the Microsoft DataGrid Control 6.0 or the Microsoft FlexGrid control--these controls are not dependent on Visual Basic for their functionality.

Status
This behavior is by design.

Good Luck,

VBSlammer
redinvader3walking.gif
 
johnwm,
I have no idea how or where to register that file manually in the registry. Never did it before. What is REgsvr32 and how do I use it??

I have heard of Regedit and know how to start it up but after that I'm lost. Can you tell me how to register this .ocx file manually??

***************

VBslammer,
I would only want to change the DB grid as a last resort. This grid works fine if I create a .exe file on the computer that I have VB6 on and use that .exe on that same computer. Trouble comes in when I try to package and distribute to another computer.

TNN, Tom
tnpayroll@truevine.net
TOM
 
On the target computer make sure the file "DBGRID32.OCX" exists. You can do this by doing a find.

If it doesn't exist, you can copy it manually (to the system directory - C:\windows\system for Win9x or C:\winnt\system32 for winNT).

Then, open the command line
Start
Run
Type command
Press OK or hit enter

Then navigate to the system directory by using the cd command ----> cd \windows\system -or- cd \winnt\system32
then do ----> regsvr32 DBGRID32.OCX

then your program should work correctly.

Then, for this to work with the package and deployment wizard, make sure this file is included in the package at the "Package and Deployment Wizard - Included Files" screen.

Hope this helps
 
bjd4jc,
I confirmed that file Dbgrid32.ocx is in the c:\windows\system directory. Using Win 98 second edition.
I then went to the command line and entered per your instructions: regsvr32 Dbgrid32.ocx. I got error message as follows:
LoadLibrary("Dbgrid32.ocx")failed.
GetLastError returns 0x0000045a

Sincerely, Stuck in the mud.

TNN, Tom
tnpayroll@truevine.net

TOM
 
I'm not sure why everybody continues to push the RegSvr32 issue. He clearly used the P&D to install this program and when the file was being self-registered it failed due to a dependency error.

The DBGrid is not a Microsoft control, it was developed by APEX Software for Microsoft, just check out it's 'About' dialog. I see numerous articles concerning licensing of active-x controls that mention the DBGrid's restrictions. Here is a snippet:

The only Visual Basic, Professional Edition, or Visual Basic, Enterprise Edition, control that requires a license is the DBGrid control. Be sure to check the Visual Basic license information and the Visual Basic documentation for more information on license options and responsibilities.

If it were me, I'd switch to the intrinsic DataGrid control that shipped with VB 6.0

VBSlammer
redinvader3walking.gif
 
After looking into your GetLastError code it would appear that you have an obsolete version of the DBGrid32.ocx file. I saw the following article previously, but ignored it because it claims to have been resolved with Studio 5.0:

----------------------------------------------------------

Microsoft Knowledge Base Article - Q174668
INFO: Dbgrid32.ocx Requires Grdkrn32.dll
The information in this article applies to:
Microsoft Visual C++ 4.0, 4.1
Microsoft Visual C++, 32-bit Enterprise Edition 4.2
Microsoft Visual C++, 32-bit Professional Edition 4.2

Summary
Attempting to register the Dbgrid32.ocx file with RegSvr32.exe, on a Windows NT version 3.51 machine, where Visual C++ or Visual Basic is not installed, gives the following error message:

LoadLibrary failed GetLastError is 0x0000045a
More Information
When trying to use Dbgrid32.ocx, one must also include Grdkrn32.dll in the Windows system directory apart from the other redistributable DLLs.

NOTE: When you run the setup wizard from Visual Basic, Grdkrn32.dll is mentioned in the Swdepend.ini file that is created. Another source of information is the Sw32tmpl.ini file found in vb\setupkit\kitfil32, where it says under dbgrid32.ocx that a file named Grdkrn32.dll is also required.

This dependency is not present in the Dbgrid32.ocx file that ships with Visual C++ 5.0.

----------------------------------------------------------

I have VB 5.0 on one machine and VB 6.0 on another and neither machine has this Grdkrn32.dll file on it, so it must have only shipped with VB 4.0

What version of DBGrid32.ocx do you have?

My VB5 version is: 5.01.4525
My VB6 version is: 5.01.8104

VBSlammer
redinvader3walking.gif
 
You might also look at Flexgrid Let me know if this helps
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
VBSlammer,
I think I will relent and do as you say and use the intrinsic datagrid control that was shipped with VB6.

Thank you for your assistance.

TNN, Tom
tnpayroll@truevine.net

TOM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top