Strange but true ... im at a loss help !!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

vs(vb.net)2005 & sql2005

Using vb.net 2003 i generated some data wizard forms. i have since updated
them in vs 2005. the base code is vb. i have come up ith a strange problem
and after spending a few days am at a total loss.

all the data forms have this code in

Public Sub UpdateDataSet()
'Create a new dataset to hold the changes that have been made to the
main dataset.
Dim objDataSetChanges As Boss.net.EditRegisteredUsers = New
Boss.net.EditRegisteredUsers
'Stop any current edits.
Me.BindingContext(objEditRegisteredUsers,
"N_RegisteredUsers").EndCurrentEdit()
'Get the changes that have been made to the main dataset.
objDataSetChanges = CType(objEditRegisteredUsers.GetChanges,
Boss.net.EditRegisteredUsers)
'Check to see if any changes have been made.
If (Not (objDataSetChanges) Is Nothing) Then
Try
'There are changes that need to be made, so attempt to
update the datasource by
'calling the update method and passing the dataset and any
parameters.
Me.UpdateDataSource(objDataSetChanges)
objEditRegisteredUsers.Merge(objDataSetChanges)
objEditRegisteredUsers.AcceptChanges()
Catch eUpdate As System.Exception
'Add your error handling code here.
Throw eUpdate
End Try
'Add your code to check the returned dataset for any errors that
may have been
'pushed into the row object's error.
End If
End Sub

of course the table names are different , however the code works on 4 of the
5 forms ... but not on the last. any ideas where to look as im at a
complete loss
 
Peter,

Very difficult, but I would start looking if I have used all the cases
between quotes right,

Cor
 
Cor,

I have strpped through the code and can see that there is data changes in
this section

Me.BindingContext(objEditRegisteredUsers,"N_RegisteredUsers").EndCurrentEdit()

but this still returns nothing
objDataSetChanges = CTypeobjEditRegisteredUsers.GetChanges,
Boss.net.EditRegisteredUsers)

hence im totally condfused, if i look at the objEditRegisteredUsers whilst
debugging i can see the changes i made to the data .. yet the next line says
there are no changes ?
 
Peter,

Can you *try* it with non typed dataset code it looks than more as your
binding

Me.BindingContext(objEditRegisteredUsers,"N_RegisteredUsers").EndCurrentEdit()

DataTable dt = objEditRegisteredUsers.Tables("N_RegisteredUsers").GetChanges
 
Back
Top