× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Adam, a wild guess. A library is not necessarily an SQL collection, and it might not have the schema information in it. This would give you the empty result, I think.

You might try a CREATE COLLECTION on the 400, then CRTDUPOBJ the files from your library into the collection, then try again.

HTH

Vern

At 09:23 AM 7/11/2003 -0400, you wrote:
I am tryign to use ADO and OpenSchema to get a list of the table headers of
an AS/400 library.  The code works fine when i do it to an Access database,
but against the AS/400 it comes back empty.  The DoWhile doesn't fire
because the recordset is empty.  I am using OS/400 4.4 and the ole db
provider with client access express 5.1.  I am also running VB 6 and ADO 2.7
on Windows XP. Is there another way of doing this or is it not supported or
something?

Here is the code I am using:

Dim sOutput As String
Dim MyRecordset As ADODB.Recordset
Set MyRecordset = New ADODB.Recordset

Set MyRecordset = MyConnection.OpenSchema _
        (adSchemaColumns, Array(Empty, Empty, "RUGR80DAT.PMSPAG00"))

    Do While Not MyRecordset.EOF
        MsgBox MyRecordset.Fields.Count
        sOutput = sOutput & MyRecordset!COLUMN_NAME & vbCrLf
        MyRecordset.MoveNext
    Loop

Adam Lang
Systems Engineer
Rutgers Casualty Insurance



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.