Solved

OLE Automation server can't create object

Posted on 1997-03-12
3
721 Views
Last Modified: 2013-11-25
I had encountered the message "OLE Automation server can't create object" while running a compiled VB .exe program on a network drive in Windows 95.

May I know what could be the possible problems?

Thank you for any replies.

0
Comment
Question by:iclpsing
3 Comments
 

Expert Comment

by:JoeyH
Comment Utility
There are a few factors that lead to this error.

The machine the application is now executing or attempting to execute on, was it installed using the SetupWizard, or copied? Or, is it the development machine?

When compiling the application, are the appropriate properties set to allow the object 1) to be Createable, SingleUse, or 2) Createable MultiUse?

Finally, check the installed machine. It is possible 1) The application is no registered correctly in the Registry, and 2) OLE Automation components are not properly registered in the Registry, or not all installed, finally 3) A component of the OLE Automation manager is corrupt.

Sorry I couldn't be more specific, but I don't know all factors of the environment and / or install.
0
 
LVL 1

Expert Comment

by:andyb013197
Comment Utility
Also if the OS is NT3.51 or earlier without the all the service packs, if you are referencing too many OLE methods/objects at tyhe same time the OS creates this error.
0
 
LVL 2

Accepted Solution

by:
dirkmartin earned 100 total points
Comment Utility
There are 3 known causes of this error.  It's error number is 429.


Error 429 typically occurs during a CreateObject call. There are several causes for this error:
Low System Resources.
Corrupt or invalid OLE Registry.
Lost connection with the OLE server.


Error 429: Low System Resources




Low system resources are a factor when CreateObject is used to load a specified application that doesn't already exist in memory. You can check system resources and memory at any time by clicking About Program Manager on the Help menu of the Windows Program Manager.

To test memory if you get error 429 in your Visual Basic code, switch to the Program Manager, and try to load the application. If you can't, you are low on system resources or memory. If you can, there may be a problem with either the syntax within CreateObject or with the registry.



Error 429: Corrupt or Invalid OLE Registry


If the OLE Registry is corrupted or invalid, you can use the following steps to restore it:
1.Exit windows. If you make these changes within Windows, they will be over-written. Windows stores the Registry in memory and writes it back out to disk when Windows exits. 2.Within the \Windows directory, make a copy of both Reg.dat and Win.ini files. 3.Delete the Reg.dat file. 4.Edit the Win.ini file, and remove the [Embedding] section. 5.Restart Windows. An empty Reg.dat file will be created. 6.Start File Manager. On the file menu, click Search, and find all files on your hard disk that have the .reg extension. That is, search for:

*.reg 7.In the search results window, double-click the files that you want to add to the registry. You should, at minimum, double-click these files:

Ole2.reg <YourApp.reg>

Some applications will attempt to automatically re-register themselves on startup. The application will look for key entries in the registry; if none is found, the application will re-register itself. If the entry comes from a second application, this means the first application may not be properly registered. You may have to manually re-register each of your applications using the technique described in this step. 8.Retry your Visual Basic application.


Error 429: Lost Connection with the OLE Server




Finally, the connection to an object may have been lost. The following code can demonstrate how this can happen:



   Dim LoadDC as Object
   Dim LoadWd as Object
   Set LoadDC = CreateObject( "Word.Document.Doc" )
   Set LoadWd = LoadDC.Application.WordBasic
   Set LoadDC = Nothing
   LoadWd.FileOpen ...




As it stands, this code may generate error 429. If the third line of code setting LoadDC to nothing is removed or changed to a comment, it works.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now