Solved

OLE Automation server can't create object

Posted on 1997-03-12
3
728 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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 lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

910 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

23 Experts available now in Live!

Get 1:1 Help Now