Have any of you VB programmers run across the following error:

------------------------------------
Run-time error: "-2147217887 (80040e21)"
Method 'OpenIndex' of object 'AD400Connection3' failed.
------------------------------------

Here is the relevent code:

'Setup connections
Private m_cn As ADODB.Connection
Private m_ix As AD400.Connection

'Setup access to the Vendor Master by key
Private m_cmInp26 As New ADODB.Command
Private m_ixInp26 As New AD400.Index

Private Sub Class_Initialize()
    Dim t As CDbTable

    Set m_cn = gADO.getConnection
    Set m_ix = gADO.getIndexConnection

    Set m_cmInp26.ActiveConnection = m_cn
    m_cmInp26.Properties("Updatability") = 0

    Set t = gTableDict.Item("INP26")
    m_cmInp26.CommandText = t.GetIfsName
    m_cmInp26.Parameters.Append m_cmInp26.CreateParameter("P1", adChar,
adParamInput, 1)
    Set m_ixInp26 = m_ix.OpenIndex(t.GetIfsName, t.GetIfsName)
End Sub


The error is raised on the last line of the procedure: "Set m_ixInp26....".
The value of "t.GetIfsName" is "/QSYS.LIB/MYLIB.LIB/MYFILE.FILE(*FIRST,
*NONE)". The file does exist, and does have a unique key.

The workstation is W2K/Sp2 with CAE 510/Sp SI02795.


Regards,

John Taylor










As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.