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

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
 
C

Cor Ligthert [MVP]

Peter,

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

Cor
 
G

Guest

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 ?
 
C

Cor Ligthert [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top