
latebound expression Error
I have an app that reads in the elements of an xml doc. The elements are
DSN's. I am trying to allow users the abilty to edit the DSN settings. I
have created a structure for the dsns and as I read in the elements they are
assigned to their respective structure and then added to the arraylist. I
want to be able to write the changes back to the xml doc. I can do this for
a single record but if the users wants to make multiple changes I would like
to rewrite the xml doc only once instead of for every change. I tried doing
this by changing the values in the arrray list by navigating to the proper
index but once I try to assign to the arraylist I get
An unhandled exception of type 'System.Exception' occurred in
microsoft.visualbasic.dll
Additional information: Latebound assignment to a field of value type
'DSNInformation' is not valid when 'DSNInformation' is the result of a
latebound expression.
Here is a snippet of the code:
sUpdateDSN.DataSourceName = ComboDSN.Text
sUpdateDSN.DatabaseName = txtDBName.Text
sUpdateDSN.Description = txtDesc.Text
sUpdateDSN.LastUser = txtUserName.Text
sUpdateDSN.Server = txtServer.Text
nDSN = ComboDSN.SelectedIndex
arrDSNS(nDSN).DataSourceName = sUpdateDSN.DataSourceName
arrDSNS(nDSN).DataBaseName = sUpdateDSN.DatabaseName
arrDSNS(nDSN).Description = sUpdateDSN.Description
arrDSNS(nDSN).LastUser = sUpdateDSN.LastUser
arrDSNS(nDSN).Server = sUpdateDSN.Server
Thanks for any help