Setting properties at runtime Error 545 on foreign computers

Posted by: c.schmid on 4 May 2020, 5:56 pm EST

  • Posted 4 May 2020, 5:56 pm EST

    We have an old VB6 Project using a TDataGrid8 and a TDataControl8 (they were bound at designtime) and a few textboxes (they were bound at runtime).

    This is the extracted code:

    With Me.TData

    .ChangeInProgress = True

    .ConnectionString = g_sConnectString

    .RecordSource = m_sSQLSource

    .Mode = adModeReadWrite

    .ChangeInProgress = False


    If .Recordset.EOF Then

    nCount = .Recordset.RecordCount()

    End If

    End With

    'Error on foreign computers...

    With Me.txtTest

    .DataField = Empty

    Set .DataSource = Me.TData

    .DataField = "Test"

    End With

    This code works on the developer maschine without any problems, in the VB6 IDE and as compiled EXE.

    On ervery other computer I get an error message at runtime: Run-time error '545': Unable to bind to field or DataMember: 'Test'

    The TDataGrid is always populated and works as espected!!!
  • Replied 4 May 2020, 9:09 pm EST


    I doubt that the problem is specific to our products. It seems related to setting the DataField for Textbox. Kindly investigate it in the application itself or search over the web.

  • Marked as Answer

    Replied 5 May 2020, 2:05 am EST

    Hi, I figured it out. I'm not sure which data component was incorrect, but simply installing the Access 2007 runtime on the machines solved the problem.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels