Solved

OLE Automation server can't create object

Posted on 1997-03-12
3
761 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Expert Comment

by:JoeyH
ID: 1424280
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
ID: 1424281
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
ID: 1424282
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month11 days, 3 hours left to enroll

628 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