Microsoft visual foxpro ошибка 1426

  • Remove From My Forums
  • Question

  • Hi experts,
    Urgent reply appreciate for this.

    OS Version — Windows 5.01
    Accessing via Microsoft terminal server 
    Word application Version:14.0-14.0.5123

    when i working with word application pro grammatically following error occurred when executing following line.
    THIS.oDocument= THIS.oWordAppObj.Documents.Add(FULLPATH(tcFileName))

    Error No :1426
    OLE error code 0x80010105: The server threw an exception.

    can any one to say what is the reason behind this and how can i solve this problem.

    can you please help to solve this problem.

    Thanks in advance. 

Answers

  • Maybe the DOT files are in a different word version or something is wrong with them. Can you open them manually in Word?

    Also inspect tcFilename, it mustn’t be a relative path.

    Bye, Olaf.

    • Marked as answer by

      Saturday, February 25, 2012 10:28 PM

INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Thanks. We have received your request and will respond promptly.

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!

  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It’s Free!

*Tek-Tips’s functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

foxpro 6.0 app has error 1426 running on Windows XP

foxpro 6.0 app has error 1426 running on Windows XP

(OP)

14 Mar 02 16:32

I developed an application in Visual 6.0 (a while back-with some difficulty) that prints graphs.  I used the setup wizard to create the files I copy to the CD-ROM.  I included Microsoft Graph 8.0 Runtime when running the setup wizard.  Since that time, I have not worked in Visual Foxpro (reverted back to 2.6).  When I load the Visual 6.0 application on my new computer with Windows XP, I get the error described below.  The program works fine on my Windows 98 machine.  Any ideas?  I will be converting the Visual 6.0 application to Visual 7.0 (if I can ever get a handle on it).  Thank you in advance.  

The error occurs on this line:

APPEND GENERAL graph CLASS «msgraph.chart»

This is the error log:

Error # 1426.00
Program click
Message OLE error code 0x800401f3: Invalid class string. (800401F3: INVALID CLASS STRING)
Line #  40.00
Active: OH1SEL2 (cmdscreen)
Session 2.00
DiskSpc **********.**
Screen  600.00 by 800.00
OS      Windows 5.01
Vers(1) Visual FoxPro 06.00.8492.00 EXE Support Library for Windows [May  7 1999 17:48:36] Product ID
Vers(2) 0.00
Vers(3) 00
SMode   4.00
(1016)  1403.01 user object memory used
(1001)  1046656.00 pool available memory
CPU     Pentium
Video   Color/Color

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Join Tek-Tips® Today!

Join your peers on the Internet’s largest technical computer professional community.
It’s easy to join and it’s free.

Here’s Why Members Love Tek-Tips Forums:

  • Tek-Tips ForumsTalk To Other Members
  • Notification Of Responses To Questions
  • Favorite Forums One Click Access
  • Keyword Search Of All Posts, And More…

Register now while it’s still free!

Already a member? Close this window and log in.

Join Us             Close

The war of 1426 1429

No, we re not talking about a centuries-old battle here, we re talking about a series of error numbers. But we re certain you ll battle these four errors frequently while writing Automation code. These four errors are raised by the Automation server sending back an error code. Which one you get depends on how much information the server is willing to provide. This is the frustrating part: there isn t any categorical difference between these errors, and each error has a variety of meanings. These four errors return every possible problem from every Automation server; in contrast, FoxPro has hundreds of error messages!

Before you think that this is an awful design, remember that FoxPro is receiving the errors in a standard COM/Automation interface. There isn t any way to assign a unique error number to every possible error in every possible server even if we could ensure the errors are unique across servers, we d have error numbers larger than GUIDs, which would cause other problems.

So why is it so frustrating to work with these four errors? You can t tell the difference between a fatal error (the server has disconnected), a syntax error, and an error that can be fixed (like a divide by zero error) by the number. Yes, it is possible to keep a meticulous database of the text and number of each error for each server, but because of the volume of errors, it s very hard to track every error you come across and stay on-track with your development efforts.

Subtle differences

As we said before, the difference between these errors is in the quantity of information the server is willing to provide. Error 1426, «OLE error code 0x,»is the most simplistic. It returns only a character string containing the hexadecimal number and a short message, for example: «OLE error code 0x800706ba: The RPC server is unavailable.» In your error handler, ERROR() returns 1426, and MESSAGE() returns «OLE error code 0x800706ba: The RPC server is unavailable.»

Errors 1427, 1428, and 1429 all appear to return similar information: an exception code followed by the message. While FoxPro sees them as different errors, their messages seem eerily similar. The differences may lie in what is returned in the AERROR() function.

Visual FoxPro s AERROR() function returns more information for an error. It builds an array with seven columns containing various information, depending on whether it is a FoxPro, OLE, or ODBC error. Help indicates that most FoxPro errors return nulls for most of the entries, with the exception of OLE errors 1427 and 1429, and ODBC error 1526. In fact, OLE errors 1426 and 1428 also make good use of AERROR().

Table 2 lists the contents of the resulting AERROR() array. Error 1426 sets only the first three values; the remaining four are set to null values. Errors 1427, 1428, and 1429 use up to seven columns of the array.

Table 2. The contents of the AERROR() array, using a 1429 error generated by Excel. The described positions reflect those for OLE errors only; not general FoxPro errors or ODBC errors, which have different descriptions.

Position

Contents

Example

1

The error number. Same as ERROR().

1429

2

Text of the VFP error message. Same as MESSAGE(). Note that this is a concatenation of some of the other information in this array.

«OLE IDispatch exception code 0 from Microsoft Excel: Unable to set the Bold property of the Font class»

3

The text of the OLE message.

«Unable to set the Bold property of the Font class»

4

The application sending the message.

«Microsoft Excel»

5

The application s Help file, if available (.Null. if not).

«c:Program FilesMicrosoft OfficeOffice1033xlmain9.chm»

6

The Help context ID, if available (.Null. if not).

0

7

The OLE 2.0 exception number.

0

Error 1426 sets the first three columns. The first is the error number, which is the same as querying ERROR(). The second is the VFP error message the one that s displayed in the error dialog box, as in: «OLE error code 0x80020026: Unknown name.» This is the same string that is returned from the MESSAGE() function. The third column contains only a portion of the text string; it is the string returned from the OLE server. VFP adds some standard text to clarify the message; in the case of 1426, it s «OLE error code 0x.» While you can parse that out of the string, it s probably easier just to check the third column of the array, which contains the error code followed by the message: «80020026: Unknown name.» Actually, it s even easier to check SYS(2018), the most recent error message parameter function. The remaining AERROR() array columns are .Null., like any other VFP error.

Errors 1427 1429 fill all columns of the array (if the Help file and Help Context ID are available). As you can see from Table 1, the VFP message is a concatenation of a standard message («OLE IDispatch exception code «), the exception number (column 7), the application name (column 4), and finally the text of the OLE message (column 3). The text of the message (column 3) is also the value returned by SYS(2018), the most recent error message parameter, which is different from error 1426, which returns just the text (as in column 3). Actually, SYS(2018) returns only the first 255 characters of the message, which can be significant in longer messages, as we ll see later on.

As we wrote this chapter, it became evident that 1426 and 1429 are the most common errors. In fact, in our hunt for error examples, we couldn t even bag a live error 1427 or 1428. This does not mean that you will never see an error 1427 or 1428; instead, it means that we haven t encountered every Office Automation error (though it sure seems that we have!). While Office may not use these errors, other COM objects might, so we strongly recommend that you build your error handler to handle 1427 and 1428, just in case.

Some interesting error observations

To really see how frustrating handling these errors can be, a few examples are in order. The first example shows the range of how informative these errors can be. For example, imagine the following line of code (yes, it has a typo in it, to illustrate our point):

oChart.ChartWizrd(oExcel.Sheets(cSheetName).Range(cGraphRange), ;

xlColumn, 6, xlColumns, 1, 1, 1, «», «», «Assets», «»)

The resulting error message is shown in Figure 1.

Figure 1. A sample error, 1426, obtained by a misspelled method name. While its conciseness is admirable, a bit of help on exactly what the unknown name is would be helpful.

Just a bit brief, no? Especially since our example has no fewer than five names in it: the references to oExcel, oChart, the ChartWizard method (which is the culprit here), the Sheets object, and the Range object. To be fair, VFP is reporting what it received from the server, so we can blame the server for its omission of one small, but very helpful, piece of information.

On the flip side, there s this error that comes from the following line of code. This line references a file that doesn t exist:

oWord.Documents.Open(«Test.Doc»)

This error, number 1429, is shown in Figure 2.

Figure 2. Another error, 1429, offers a lot of information. There s so much information, it even has a scroll bar!

This message is so unusually long and informative, the error message box actually has a scroll bar to allow you to read the full text of the message! The full text of the error message is as follows:

OLE IDispatch exception code 0 from Microsoft Word: This file could not be found.

Try one or more of the following:

* Check the spelling of the name of the document.

* Try a different file name.

(Test.Doc).

It was while testing this error that we found that SYS(2018) contains only the first 255 characters.

Another situation is that the same error number gives different kinds of errors that need to be handled differently. One kind of error is the syntax error, those pesky typos that the compiler usually catches, or the run-time notification that informs you that you ve reversed those two parameters. Another kind of error is when the user is notified that their system is improperly configured, or they ve made a mistake. Almost all FoxPro errors fall into one category or the other, so it s much easier to handle each individual error.

Errors 1426 1429 return errors in both of these categories (and any other category you can think of). To illustrate, let s pick on error 1426. We ve already talked about «OLE error code 0x80020026: Unknown name,» shown in Figure 1, which generally means there s a misspelled method or property in the code and the developer needs to fix the code. The error handler can gracefully skip this line, shut down the module, or whatever action is appropriate (ideally, the developer fixes this before it gets to the user!). In contrast to that situation, Figure 3 shows a different error: «OLE error code 0x800706ba: The RPC server is unavailable.» This error can show up on two occasions: when you re opening the server and it doesn t start up correctly (or doesn t start up all), or later, after your program opens the server, and the user closes it before your program is finished with it. Another 1426 classic is «OLE error code 0x80080005: Server execution failed.» This means that the server is registered, but the actual EXE file isn t found (usually due to the user uninstalling by deleting the folder instead of using the Uninstall routine). These last two errors are handled a bit differently than a syntax error! Who knows how many other errors are returned as 1426.

Figure 3. Another error 1426, this one indicating the server is unavailable. Automation errors can return nearly any kind of error (including syntax errors, run-time errors, and configuration errors), which makes programming your error handler a bit tricky.

Copyright 2000 by Tamar E. Granor and Della Martin All Rights Reserved

OLE error code 0x»<name>». (1426)

[Код ошибки OLE 0х…]

Вы получили из OLE код ошибки (шестнадцатеричный) и ее краткое описание.

Рекомендуемые действия зависят от конкретной ошибки, возвращенной OLE.

Новое на сайте

  • Обновлен портфель программиста

    Добавлены: Установка HTML Help (Создание справочной системы), Imagedit.zip — Графический редактор ( ico и bmp), Библиотека локализации HTML Help (Русский)

  • Новые примеры программ

    Установка библиотек, Игровая программа «Охота на лис», Установка библиотек «Охота на лис», plastic -«Платежки», Библиотеки (на FPD26), platan -«Платежки» (на Clipper 5.2)

  • Обновленна справка

    Подсказки, технология программирования и использование Visual FoxPro. Команды, функции, операторы, объекты, свойства, события и методы.

  • A few things to understand:

    a) UAC — even the main Administrator account or users of the Administrator group start any process with normal elevation. To really act as Admin, start cmd.exe via the Start menu entry. Right Click on Start and find «Command Prompt (Admin)». The
    Command Prompt starting will have «Admin» in the titlebar.

    b) 64Bit systems have a 32bit subsystem you need to use, not in System32, but in SysWOW64, inversely as you would think. WOW64 means Windows32OnWindows64, MS shortened it so everybody thinks it’s the 64bit system folder. The 64bit system folder is System32
    and kept its name for «downward compatibility». Don’t blame me.

    c) You don’t only need to put your mscomctl.ocx into SysWow64, you also need to use the regsvr32,exe from that folder, so finally the command should be:

    C:WindowsSysWoW64regsvr32 C:WindowsSysWoW64mscomctl.ocx

    or you CD C:WindowsSysWoW64 and then do
    regsvr32 mscomctl.ocx

    I nowadays don’t assume you have a pure 32bit Windows, in that case SysWOW64 won’t exist, but you still need to take a) into account: Use the Command Promt (Admin).

    Bye, Olaf.


    Olaf Doschke — Freelancer

    • Edited by

      Thursday, February 23, 2017 8:01 AM

    • Marked as answer by
      Tom BorgmannEditor
      Thursday, March 9, 2017 11:02 AM
  • INTELLIGENT WORK FORUMS
    FOR COMPUTER PROFESSIONALS

    Contact US

    Thanks. We have received your request and will respond promptly.

    Log In

    Come Join Us!

    Are you a
    Computer / IT professional?
    Join Tek-Tips Forums!

    • Talk With Other Members
    • Be Notified Of Responses
      To Your Posts
    • Keyword Search
    • One-Click Access To Your
      Favorite Forums
    • Automated Signatures
      On Your Posts
    • Best Of All, It’s Free!

    *Tek-Tips’s functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

    Posting Guidelines

    Promoting, selling, recruiting, coursework and thesis posting is forbidden.

    Students Click Here

    Ole Error Code 0x80040154

    Ole Error Code 0x80040154

    (OP)

    27 Sep 15 13:33

    Hi, i have a program automatically running on the server based on schedule.
    However, it shows Ole Error Code 0x80040154 Class is not registered(w/o error number).
    The program runs in other server without any problem.
    I have already registered Comctl32.ocx and MSComct2.ocx.

    Please help since I cant find a solution to this long problem.

    Thanks in advance!

    Red Flag Submitted

    Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
    The Tek-Tips staff will check this out and take appropriate action.

    Join Tek-Tips® Today!

    Join your peers on the Internet’s largest technical computer professional community.
    It’s easy to join and it’s free.

    Here’s Why Members Love Tek-Tips Forums:

    • Tek-Tips ForumsTalk To Other Members
    • Notification Of Responses To Questions
    • Favorite Forums One Click Access
    • Keyword Search Of All Posts, And More…

    Register now while it’s still free!

    Already a member? Close this window and log in.

    Join Us             Close

    Hello Again Everyone,

    It seems that I closed out my previous question a bit prematurely.  I thought for sure that installing 32bit SQL Server would solve the problem, but that doesn’t look to be the case.  After completely uninstalling SQL Server x64, rebooting, and installing SQL Server x86, I got the error message attached below.

    At least it is a different error message.  Does anyone have any ideas as to what could be the problem?

    Thanks in advance.

    —Charly

    ===================================
    
    ===================================
    
    Feature is not available. (Microsoft OLE DB Provider for Visual FoxPro)
    
    ------------------------------
    Program Location:
    
       at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
       at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.OleDb.OleDbConnection.Open()
       at Microsoft.SqlServer.Dts.DtsWizard.DTSWizard.GetOpenedConnection(WizardInputs wizardInputs, String connEntryName)
       at Microsoft.SqlServer.Dts.DtsWizard.Step1.OnLeavePage(LeavePageEventArgs e)
    

    Open in new window

    Got this one while trying it again:

    ===================================
    
    An error occurred which the SQL Server Integration Services Wizard was not prepared to handle. (SQL Server Import and Export Wizard)
    
    ===================================
    
    External component has thrown an exception. (Interop.MSDASC)
    
    ------------------------------
    Program Location:
    
       at MSDASC.DataLinksClass.PromptEdit(Object& ppADOConnection)
       at Microsoft.SqlServer.Dts.DtsWizard.OLEDBForm.buttonProperties_Click(Object sender, EventArgs e)
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    

    Open in new window

    0 / 0 / 0

    Регистрация: 08.11.2020

    Сообщений: 92

    1

    04.05.2022, 15:05. Показов 869. Ответов 4


    Студворк — интернет-сервис помощи студентам

    У меня код:

    Код

    lc_nmfp = GETFILE()
       IF LEN(ALLTRIM(lc_nmfp)) < 1 then
       MESSAGEBOX("файл не выбран")
       RETURN
       endif
    ln_w = GETWORDCOUNT(lc_nmfp,"")
    lc_nmf = GETWORDNUM(lc_nmfp,ln_w,"")
    lc_f = GETWORDNUM(lc_nmf,1,".")
    lc_p = ""
    ln_i = 1
       DO while ln_i < ln_w
       lc_p = ALLTRIM(lc_p)+ALLTRIM(GETWORDNUM(lc_nmfp,ln_i,""))+""
       ln_i = ln_i+1
       ENDDO
    
    CREATE CURSOR tmp(H Char(12), N char(2))
    CREATE CURSOR xlsfile(AccountName CHAR(20), TrafficSourceCommunicationName CHAR(20), CommunicationScheduledFor CHAR(20), CommunicationStartDate CHAR(20), CommunicationTemplate CHAR(20), Fromv CHAR(12), Tov CHAR(12), MessageId CHAR(45),	SendAt CHAR(35), CountryPrefix	CHAR(2), CountryName CHAR(16), NetworkName CHAR(21), PurchasePrice CHAR(2), Statusv CHAR(25), Reason CHAR(25), Action CHAR(25), ErrorGroup CHAR(25), ErrorName CHAR(80), DoneAt CHAR(15), Textv CHAR(254), MessagesCount CHAR(2), ServiceName CHAR(16), UserName CHAR(19), SeenAt CHAR(19),	Clicks CHAR(19), PairedMessageId CHAR(19), DataPayload CHAR(19))
    
    IMPORT FROM lc_p+lc_f+".xls" TYPE XL8 SHEET SData
    
    SELECT H, N FROM viber_exp WHERE VAL(N) = 1
    
    
    
    
    
    oleObject=CREATEOBJECT('EXCEL.Application')
     
    oleObject.application.Visible= .T.
    
    
    nRow=0
    
    SCAN 
    	nRow=nRow+1
    	oleObject.Cells(nRow,1).Value=viber_exp.H
    
    
    	oleObject.Cells(nRow,2).Value=viber_exp.H
    
    	
    ENDSCAN

    В строчках oleObject.Cells(nRow,1).Value=viber_exp.H выдает ошибку «OLE error Unknown COM status code»
    Подскажите как это пофиксить

    0

    I have modified an old FoxPro application in VFP SP2 and the final executable(.exe) works fine in my development system. Even in debug mode the application is fine. But when i try running the same build along with the supporting DLLs (got this info after googling) in another system it throws out these errors and the program terminates. However these errors are intermittent.

    Fatal error: Exception code=C0000005 @ 09/12/14 03:31:07 PM. Error log file: D:toolVFP9Rerr.log
    Called from -  load line 0  { load.fxp}
    Called from -  report line 0  { report.fxp}
    Called from -  master line 0  { d:toolTool.exe}
    

    Another Error is:

    Exception: 1426 - OLE error code 0x800a004c: Unknown COM status code.
    Procedure: master
    Line Number:0
    

    And the most Frequent one :

    Microsoft Visual FoxPro has stopped Working.
    

    Im facing these issues only in other systems. In the Development System it is working good.

    Im using Windows 7, 64bit for both development and testing.

    These are the DLLs i used:

       VFP9RENU.DLL
       VFP9RENU.DLL
       vfp9r.dll
       GdiPlus.dll
       msvcr71.dll
       msvcr100_clr0400.dll
       msvcr110_clr0400.dll
       msvcrt.dll
    

    Why is this happening in other systems ?

    Further checking the Events Viewer, i found these error.

    Faulting application name: Tool.exe, version: 8.0.2.0, time stamp: 0x47139f24 
    Faulting module name: VFP9R.DLL, version: 9.0.0.7423, time stamp: 0x49a31c32 
    Exception code: 0xc0000005 
    offset: 0x0031ad76 
    Faulting process id: 0x17d4 
    Faulting application start time: 0x01cfd0cec9e7d5ad 
    Faulting application path: D:toolTool.exe 
    Faulting module path: D:toolVFP9R.DLL 
    Report Id: 633e87a9-3cc2-11e4-8b21-54eb6ccd700b
    

  • Microsoft visual c ошибка 2203
  • Microsoft store ошибка 0x800706d9
  • Microsoft visual c ошибка 0x80070641
  • Microsoft store ошибка 0x800704cf
  • Microsoft visual c общая ошибка доверия