C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

XArrayDB

rated by 0 users
This post has 3 Replies | 2 Followers

Top 500 Contributor
Posts 21
levanduyet Posted: Fri, Oct 17 2008 2:31 AM

 I have bought the VS ActiveX, but Why I can not use XArrayDB activeX.

When I drag onto the form the error shown that:

System Error &H800004005 (-2147467259).

Please help.

Le Van Duyet

Top 25 Contributor
Posts 359
C1_SteveB replied on Fri, Oct 17 2008 8:44 AM

Hello Le Van,

Can you please send me a short sample of your form.  I can't reproduce it, but i want to see whats going on with yours.  Once you send it to me I'll be able to get this figured out for you.

Thanks,

-Steve

Top 500 Contributor
Posts 21

 Dear Steve,

As the first post (#1), I have add the XArrayDB to control toolbox and drag this control onto the form then the error show as following:

By the way, regarding the TDBCombo, I have the code as following:

Private Sub Form_Load()
    Dim iCon As Long
    Dim sSQL$, oRs As Object


    iCon = ConnectToDB()
    If iCon = 1 Then
        gcnAccess.Open
       
        sSQL1 = "SELECT sMaNo, sMaDes, sMaUoM FROM TB_Materials;"
        Set oRs = CreateObject("ADODB.Recordset")
        Set oRs = SqlGetRecordset(gcnAccess, sSQL1) 'This function to get back the recordset only

       ' I have check the oRs.RecordCount, oRs.RecordCount>0

       'But why it did not show the data on the TDBCombo
        Set TDBCombo.RowSource = oRs
       'But when I fill this Recordset to vsFlexgrid, it's ok
        With fg
            .DataMode = flexDMFree
            .Appearance = flexFlat
            .AllowUserResizing = flexResizeColumns
            .SelectionMode = flexSelectionListBox
            Set .DataSource = oRs
        End With

    Else
        MsgBox "Can not connect to database.", vbOKOnly + vbInformation, mcsAppName
    End If
    Set oRs = Nothing

End Sub

 

Le Van Duyet

Top 25 Contributor
Posts 359
C1_SteveB replied on Fri, Oct 17 2008 11:20 AM

Hello again,

 Ok, so I have a couple ideas i'm going to throw at you on this.  First thing, here is the link to XArrayDB, this will show you how to add it and basically anything you can use with this class is documented there.  I think how XArrayDB is being used isn't completely correct.  So check out the link and lets try it that way, I feel the error is happening because of the way it is being droped... Creating this is usually done through code.

http://helpcentral.componentone.com/nethelp/truedbgrid8/usingthexarraydbobject.htm

 Let me know how this works for you.  And if you have any other questions, please let me know!

Thanks,

-Steve

Page 1 of 1 (4 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.