M
Mike
I have the following:
1 x .NET 2.0 .DLL
Containing one public DataSet (CustomerHandler) which contains one table and
a tableadapter to fill a datatable
1 x .NET 2.0 EXE
With a single form containing a DataSet (CustomerHandler1), a BindingSource
and a BindingNavigator. And also a whole load of textbox controls which are
databound to the BindingSource.
1 x SQL Server Express database
--
The problem is this:
When I enter the form, it reads the data perfectly and I can move from
record to record vis the BindingNavigator, and even add, delete and update
records. However, these changes are not being carried through to the
database - I ran SQL Server Profiler on the database and nothing was
happening at any stage, not even when the .EndEdit() method was called. I am
assuming that because I have a DataSet (CustomerHandler1) on my form, that
it is this that is being changed, and not the dataset in the satellite
assembly.
I want all my data in the satellite assembly as this is my data access layer
(DAL).
The code is as follows (CustomerHandler is the name of my dataset as defined
in the satellite assembly):
Dim CustomerHandlerTA As New
CustomerHandlerTableAdapters.II_CUSTOMERTableAdapter
Try
CustomerHandlerTA = New CustomerHandlerTableAdapters.II_CUSTOMERTableAdapter
CustomerHandlerTA.Fill(CustomerHandler1.II_CUSTOMER)
Catch ex As Exception
MsgBox(ex.Message)
Finally
CustomerHandlerTA = Nothing
End Try
Private Sub SaveChanges_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles SaveChanges.Click
BindingSource.EndEdit()
End Sub
--
It all works perfectly in read-only mode and the dataset can be edited in
memory, but why aren't changes being propogated through to the database?
Any suggestions very warmly welcome!
Mike
1 x .NET 2.0 .DLL
Containing one public DataSet (CustomerHandler) which contains one table and
a tableadapter to fill a datatable
1 x .NET 2.0 EXE
With a single form containing a DataSet (CustomerHandler1), a BindingSource
and a BindingNavigator. And also a whole load of textbox controls which are
databound to the BindingSource.
1 x SQL Server Express database
--
The problem is this:
When I enter the form, it reads the data perfectly and I can move from
record to record vis the BindingNavigator, and even add, delete and update
records. However, these changes are not being carried through to the
database - I ran SQL Server Profiler on the database and nothing was
happening at any stage, not even when the .EndEdit() method was called. I am
assuming that because I have a DataSet (CustomerHandler1) on my form, that
it is this that is being changed, and not the dataset in the satellite
assembly.
I want all my data in the satellite assembly as this is my data access layer
(DAL).
The code is as follows (CustomerHandler is the name of my dataset as defined
in the satellite assembly):
Dim CustomerHandlerTA As New
CustomerHandlerTableAdapters.II_CUSTOMERTableAdapter
Try
CustomerHandlerTA = New CustomerHandlerTableAdapters.II_CUSTOMERTableAdapter
CustomerHandlerTA.Fill(CustomerHandler1.II_CUSTOMER)
Catch ex As Exception
MsgBox(ex.Message)
Finally
CustomerHandlerTA = Nothing
End Try
Private Sub SaveChanges_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles SaveChanges.Click
BindingSource.EndEdit()
End Sub
--
It all works perfectly in read-only mode and the dataset can be edited in
memory, but why aren't changes being propogated through to the database?
Any suggestions very warmly welcome!
Mike