Jump to content

MSDATASRC... doesn't work in code!


Recommended Posts

This is converted code from a project.  It is a basic combo box loading routine.  

The cbo.RowSource is an MSDATASRC an the rst is the created / converted ADORecordSetHelper.

They aren't compatible!  Okay so what can I assign in code to make this work?


Link to comment
Share on other sites

  • Mobilize.Net Staff

Hi Devon,

the cbo is a Activex Combobox, so it's not a .Net control. Because of that, the RowSource property cannot be assigned to a .Net class. At this point there are two alternatives:

1. Change the AxDataCombo by a .Net control. In that case it would be compatible with other .Net classes/components. This have to be done in a manual fashion as currently the VBUC does not automatically convert that control to a .Net one.

2. Migrate the vb6 code using ADODB via Com Interop (see attached file). By doing this, all classic adodb code willnot be converted to ADO.Net, so the cbo.RowSource and the rst object may be compatible.

However, as you're converting your code to .Net my suggestion would be the option 1.







Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use