S
Silby
Hi,
I've been trying to work with the latest mysql connector-net to try and
create a little program that helps me maintain a small mysql database.
Connecting to the database and filling a dataset works just fine. But when
i update something, nothing registers on the remote server.
The changes are saved correctly in the dataset, and upon calling
dataadapter.Update, nothing happens at all. No error, no updates :S
First i fill the dataset
myConnection.Open()
myDA.Fill(myDS, "woningen")
myDA.Fill(myDS, "fotos")
myConnection.Close()
Then i create a number of databindings to textboxes.
and to update, i do this:
bmWoningen.EndCurrentEdit()
myDS.Tables("woningen").AcceptChanges()
myDA.Update(myDS, "woningen")
And finally, here are my declarations (with a little editing of the
connection string
Dim myConnectString As String = "Database=xxxx;Data Source=xxxx;User
Id=xxxx;Password=xxxx"
Dim myConnection As New MySqlClient.MySqlConnection(myConnectString)
Dim myDS As New DataSet()
Dim myQuery As String = "SELECT * FROM woningen"
Dim myDA As New MySqlClient.MySqlDataAdapter(myQuery, myConnection)
Dim myCB As New MySqlClient.MySqlCommandBuilder()
Dim bmWoningen As BindingManagerBase
I hope someone can tell me what i'm doing wrong.
Regards
I've been trying to work with the latest mysql connector-net to try and
create a little program that helps me maintain a small mysql database.
Connecting to the database and filling a dataset works just fine. But when
i update something, nothing registers on the remote server.
The changes are saved correctly in the dataset, and upon calling
dataadapter.Update, nothing happens at all. No error, no updates :S
First i fill the dataset
myConnection.Open()
myDA.Fill(myDS, "woningen")
myDA.Fill(myDS, "fotos")
myConnection.Close()
Then i create a number of databindings to textboxes.
and to update, i do this:
bmWoningen.EndCurrentEdit()
myDS.Tables("woningen").AcceptChanges()
myDA.Update(myDS, "woningen")
And finally, here are my declarations (with a little editing of the
connection string
Dim myConnectString As String = "Database=xxxx;Data Source=xxxx;User
Id=xxxx;Password=xxxx"
Dim myConnection As New MySqlClient.MySqlConnection(myConnectString)
Dim myDS As New DataSet()
Dim myQuery As String = "SELECT * FROM woningen"
Dim myDA As New MySqlClient.MySqlDataAdapter(myQuery, myConnection)
Dim myCB As New MySqlClient.MySqlCommandBuilder()
Dim bmWoningen As BindingManagerBase
I hope someone can tell me what i'm doing wrong.
Regards