|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Problème data tramsmission from tableadapter to ACCESS databaseThis datagridview is constructed on a dataset filled by a tableadapter. The table adapter do very well what it must do when filling dataset. Insertions, modifications and deletions functions very well in the dataset. But impossible to transmit modifications in ACCESS database. Impossible to WRITE in database. Here is the code for data transmission from tableadapter to Access database : Private Sub ArtistesBindingNavigatorSaveItem_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles ArtistesBindingNavigatorSaveItem.Click Try Me.Validate() Me.ArtistesBindingSource.EndEdit() Me.ArtistesTableAdapter.Update(Me.StarDvdDataDataSet.artistes) System.Windows.Forms.MessageBox.Show("Success !") Catch ex As Exception System.Windows.Forms.MessageBox.Show(ex.Message) End Try End Sub Program says "Success !" but nothing has changed in access database. May be I am stupid, but I don't understand ! Please help me. Excuse me for my english. I'm french. Philip,
There are not much people who write "probleme" as you do. However this is an International newsgroup, so we understand a lot even if it is in not correct English. What you probably need is just the endcurrentedit, that pushes the data down in the datasource. Probably with your strongly typed dataset if that is the datasource. BindingContext(StarDvdDataDataSet.artistes).EndCurrentEdit() I hope this helps, Cor Show quoteHide quote "philip" <p***@philippe.com> schreef in bericht news:43db6d9b$0$18304$8fcfb975@news.wanadoo.fr... > On a form, I have a datagridview. > This datagridview is constructed on a dataset filled by a tableadapter. > The table adapter do very well what it must do when filling dataset. > Insertions, modifications and deletions functions very well in the > dataset. > But impossible to transmit modifications in ACCESS database. Impossible to > WRITE in database. > > Here is the code for data transmission from tableadapter to Access > database : > > Private Sub ArtistesBindingNavigatorSaveItem_Click(ByVal sender As > System.Object, ByVal e As System.EventArgs) Handles > ArtistesBindingNavigatorSaveItem.Click > Try > Me.Validate() > Me.ArtistesBindingSource.EndEdit() > Me.ArtistesTableAdapter.Update(Me.StarDvdDataDataSet.artistes) > System.Windows.Forms.MessageBox.Show("Success !") > Catch ex As Exception > System.Windows.Forms.MessageBox.Show(ex.Message) > End Try > End Sub > > Program says "Success !" but nothing has changed in access database. > > May be I am stupid, but I don't understand ! > > Please help me. > Excuse me for my english. I'm french. > Thanks for uyour help
I added the line : Me.BindingContext(EssaiBindingSource).EndCurrentEdit() to try if "Me.EssaiBindingSource.EndEdit() " is not enough : Private Sub EssaiBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EssaiBindingNavigatorSaveItem.Click Try Me.Validate() Me.EssaiBindingSource.EndEdit() Me.BindingContext(EssaiBindingSource).EndCurrentEdit() Me.EssaiTableAdapter.Update(Me.Bd11DataSet.essai) System.Windows.Forms.MessageBox.Show("Success !") Catch ex As Exception System.Windows.Forms.MessageBox.Show(ex.Message) End Try End Sub Nothing happened. Access database has not changed. Modifications are always good in dataset, but not transmitted to Access Dababase. And this time, I use a very little database with only one table with only three fields : 1 autoincrement field, ans 2 text fields. And there is one row (line) of data in table, writen directly in Access (because I cannot do it in Visual Studio 2005). I have created this database specially for resolving my problem, to be sure that no relation troubled the process. Curious thing : One of the two text fields are declared as unique (both in Access database, and dataset structure in vsstudio). My table as only one line ans I try to add a new line. If I write a line with the same value as the first for this unique field, I have the waited message "Column 'Nom' is constrained to be unique". If I give 'false' to the unique property of this field in Dataset Designer, letting unique in Access table, I have the message of Access (in french, it's a french version of Access) : "Risque de doublons". Access detects the unique problem. So he TRIES to write in database. BUT IT'S IMPOSSIBLE TO WRITE A SECOND LINE IN TABLE from Visual Studio 2005, EVEN IF I GIVE GOOD DATA (not unique) FOR THE SECOND LINE. The Dataset creates line, takes data, but tableAdapter cannot write it in database. Do you see another reason for this impossibility to write in database ? If someone of Microsoft can examine the problem, he is welcome. Because today I don't like Microsoft. -) "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> a écrit dans le message de news: e%23BcxRBJGHA.2***@tk2msftngp13.phx.gbl...Show quoteHide quote > Philip, > > There are not much people who write "probleme" as you do. However this is > an International newsgroup, so we understand a lot even if it is in not > correct English. > > What you probably need is just the endcurrentedit, that pushes the data > down in the datasource. > > Probably with your strongly typed dataset if that is the datasource. > > BindingContext(StarDvdDataDataSet.artistes).EndCurrentEdit() > > I hope this helps, > > Cor > > > "philip" <p***@philippe.com> schreef in bericht > news:43db6d9b$0$18304$8fcfb975@news.wanadoo.fr... >> On a form, I have a datagridview. >> This datagridview is constructed on a dataset filled by a tableadapter. >> The table adapter do very well what it must do when filling dataset. >> Insertions, modifications and deletions functions very well in the >> dataset. >> But impossible to transmit modifications in ACCESS database. Impossible >> to WRITE in database. >> >> Here is the code for data transmission from tableadapter to Access >> database : >> >> Private Sub ArtistesBindingNavigatorSaveItem_Click(ByVal sender As >> System.Object, ByVal e As System.EventArgs) Handles >> ArtistesBindingNavigatorSaveItem.Click >> Try >> Me.Validate() >> Me.ArtistesBindingSource.EndEdit() >> Me.ArtistesTableAdapter.Update(Me.StarDvdDataDataSet.artistes) >> System.Windows.Forms.MessageBox.Show("Success !") >> Catch ex As Exception >> System.Windows.Forms.MessageBox.Show(ex.Message) >> End Try >> End Sub >> >> Program says "Success !" but nothing has changed in access database. >> >> May be I am stupid, but I don't understand ! >> >> Please help me. >> Excuse me for my english. I'm french. >> > > Philip,
Did you try what I wrote as well? Cor Show quoteHide quote "philip" <p***@philippe.com> schreef in bericht news:43dbb140$0$21293$8fcfb975@news.wanadoo.fr... > Thanks for uyour help > > I added the line : Me.BindingContext(EssaiBindingSource).EndCurrentEdit() > to try if "Me.EssaiBindingSource.EndEdit() > " is not enough : > > Private Sub EssaiBindingNavigatorSaveItem_Click(ByVal sender As > System.Object, ByVal e As System.EventArgs) Handles > EssaiBindingNavigatorSaveItem.Click > Try > Me.Validate() > Me.EssaiBindingSource.EndEdit() > Me.BindingContext(EssaiBindingSource).EndCurrentEdit() > Me.EssaiTableAdapter.Update(Me.Bd11DataSet.essai) > System.Windows.Forms.MessageBox.Show("Success !") > Catch ex As Exception > System.Windows.Forms.MessageBox.Show(ex.Message) > End Try > End Sub > > Nothing happened. Access database has not changed. Modifications are > always good in dataset, but not transmitted to Access Dababase. > > And this time, I use a very little database with only one table with only > three fields : 1 autoincrement field, ans 2 text fields. > And there is one row (line) of data in table, writen directly in Access > (because I cannot do it in Visual Studio 2005). > I have created this database specially for resolving my problem, to be > sure that no relation troubled the process. > > Curious thing : > One of the two text fields are declared as unique (both in Access > database, and dataset structure in vsstudio). > My table as only one line ans I try to add a new line. If I write a line > with the same value as the first for this unique field, I have the waited > message "Column 'Nom' is constrained to be unique". > If I give 'false' to the unique property of this field in Dataset > Designer, letting unique in Access table, I have the message of Access (in > french, it's a french version of Access) : "Risque de doublons". Access > detects the unique problem. So he TRIES to write in database. > > BUT IT'S IMPOSSIBLE TO WRITE A SECOND LINE IN TABLE from Visual Studio > 2005, EVEN IF I GIVE GOOD DATA (not unique) FOR THE SECOND LINE. > The Dataset creates line, takes data, but tableAdapter cannot write it in > database. > > Do you see another reason for this impossibility to write in database ? > > If someone of Microsoft can examine the problem, he is welcome. Because > today I don't like Microsoft. -) > > "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> a écrit dans le message de > news: e%23BcxRBJGHA.2***@tk2msftngp13.phx.gbl... >> Philip, >> >> There are not much people who write "probleme" as you do. However this is >> an International newsgroup, so we understand a lot even if it is in not >> correct English. >> >> What you probably need is just the endcurrentedit, that pushes the data >> down in the datasource. >> >> Probably with your strongly typed dataset if that is the datasource. >> >> BindingContext(StarDvdDataDataSet.artistes).EndCurrentEdit() >> >> I hope this helps, >> >> Cor >> >> >> "philip" <p***@philippe.com> schreef in bericht >> news:43db6d9b$0$18304$8fcfb975@news.wanadoo.fr... >>> On a form, I have a datagridview. >>> This datagridview is constructed on a dataset filled by a tableadapter. >>> The table adapter do very well what it must do when filling dataset. >>> Insertions, modifications and deletions functions very well in the >>> dataset. >>> But impossible to transmit modifications in ACCESS database. Impossible >>> to WRITE in database. >>> >>> Here is the code for data transmission from tableadapter to Access >>> database : >>> >>> Private Sub ArtistesBindingNavigatorSaveItem_Click(ByVal sender As >>> System.Object, ByVal e As System.EventArgs) Handles >>> ArtistesBindingNavigatorSaveItem.Click >>> Try >>> Me.Validate() >>> Me.ArtistesBindingSource.EndEdit() >>> >>> Me.ArtistesTableAdapter.Update(Me.StarDvdDataDataSet.artistes) >>> System.Windows.Forms.MessageBox.Show("Success !") >>> Catch ex As Exception >>> System.Windows.Forms.MessageBox.Show(ex.Message) >>> End Try >>> End Sub >>> >>> Program says "Success !" but nothing has changed in access database. >>> >>> May be I am stupid, but I don't understand ! >>> >>> Please help me. >>> Excuse me for my english. I'm french. >>> >> >> > > Yes I tried what you write, adding the line you asked me to add when I add
"Me.BindingContext essaiBindingSource).EndCurrentEdit()" No ? With this line, I push the data down in the datasource. But data doesn't modify Access Database. I'm always to the same point. Is this problem appearing for the first time, or is it a common problem ? Thanks for your response. Philip "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> a écrit dans le message de news: OAT46kKJGHA.***@TK2MSFTNGP09.phx.gbl...Show quoteHide quote > Philip, > > Did you try what I wrote as well? > > Cor > > "philip" <p***@philippe.com> schreef in bericht > news:43dbb140$0$21293$8fcfb975@news.wanadoo.fr... >> Thanks for uyour help >> >> I added the line : Me.BindingContext(EssaiBindingSource).EndCurrentEdit() >> to try if "Me.EssaiBindingSource.EndEdit() >> " is not enough : >> >> Private Sub EssaiBindingNavigatorSaveItem_Click(ByVal sender As >> System.Object, ByVal e As System.EventArgs) Handles >> EssaiBindingNavigatorSaveItem.Click >> Try >> Me.Validate() >> Me.EssaiBindingSource.EndEdit() >> Me.BindingContext(EssaiBindingSource).EndCurrentEdit() >> Me.EssaiTableAdapter.Update(Me.Bd11DataSet.essai) >> System.Windows.Forms.MessageBox.Show("Success !") >> Catch ex As Exception >> System.Windows.Forms.MessageBox.Show(ex.Message) >> End Try >> End Sub >> >> Nothing happened. Access database has not changed. Modifications are >> always good in dataset, but not transmitted to Access Dababase. >> >> And this time, I use a very little database with only one table with only >> three fields : 1 autoincrement field, ans 2 text fields. >> And there is one row (line) of data in table, writen directly in Access >> (because I cannot do it in Visual Studio 2005). >> I have created this database specially for resolving my problem, to be >> sure that no relation troubled the process. >> >> Curious thing : >> One of the two text fields are declared as unique (both in Access >> database, and dataset structure in vsstudio). >> My table as only one line ans I try to add a new line. If I write a line >> with the same value as the first for this unique field, I have the waited >> message "Column 'Nom' is constrained to be unique". >> If I give 'false' to the unique property of this field in Dataset >> Designer, letting unique in Access table, I have the message of Access >> (in french, it's a french version of Access) : "Risque de doublons". >> Access detects the unique problem. So he TRIES to write in database. >> >> BUT IT'S IMPOSSIBLE TO WRITE A SECOND LINE IN TABLE from Visual Studio >> 2005, EVEN IF I GIVE GOOD DATA (not unique) FOR THE SECOND LINE. >> The Dataset creates line, takes data, but tableAdapter cannot write it in >> database. >> >> Do you see another reason for this impossibility to write in database ? >> >> If someone of Microsoft can examine the problem, he is welcome. Because >> today I don't like Microsoft. -) >> >> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> a écrit dans le message >> de news: e%23BcxRBJGHA.2***@tk2msftngp13.phx.gbl... >>> Philip, >>> >>> There are not much people who write "probleme" as you do. However this >>> is an International newsgroup, so we understand a lot even if it is in >>> not correct English. >>> >>> What you probably need is just the endcurrentedit, that pushes the data >>> down in the datasource. >>> >>> Probably with your strongly typed dataset if that is the datasource. >>> >>> BindingContext(StarDvdDataDataSet.artistes).EndCurrentEdit() >>> >>> I hope this helps, >>> >>> Cor >>> >>> >>> "philip" <p***@philippe.com> schreef in bericht >>> news:43db6d9b$0$18304$8fcfb975@news.wanadoo.fr... >>>> On a form, I have a datagridview. >>>> This datagridview is constructed on a dataset filled by a tableadapter. >>>> The table adapter do very well what it must do when filling dataset. >>>> Insertions, modifications and deletions functions very well in the >>>> dataset. >>>> But impossible to transmit modifications in ACCESS database. Impossible >>>> to WRITE in database. >>>> >>>> Here is the code for data transmission from tableadapter to Access >>>> database : >>>> >>>> Private Sub ArtistesBindingNavigatorSaveItem_Click(ByVal sender As >>>> System.Object, ByVal e As System.EventArgs) Handles >>>> ArtistesBindingNavigatorSaveItem.Click >>>> Try >>>> Me.Validate() >>>> Me.ArtistesBindingSource.EndEdit() >>>> >>>> Me.ArtistesTableAdapter.Update(Me.StarDvdDataDataSet.artistes) >>>> System.Windows.Forms.MessageBox.Show("Success !") >>>> Catch ex As Exception >>>> System.Windows.Forms.MessageBox.Show(ex.Message) >>>> End Try >>>> End Sub >>>> >>>> Program says "Success !" but nothing has changed in access database. >>>> >>>> May be I am stupid, but I don't understand ! >>>> >>>> Please help me. >>>> Excuse me for my english. I'm french. >>>> >>> >>> >> >> > > Philip,
I wrote this one. > Yes I tried what you write, adding the line you asked me to add when I add BindingContext(StarDvdDataDataSet.artistes).EndCurrentEdit()> "Me.BindingContext essaiBindingSource).EndCurrentEdit()" I am curious what it says when it does not accept that one? Cor He accepts this line : "Me.BindingContext
essaiBindingSource).EndCurrentEdit()" But nothing happens. Message box gives me the message "Success", but nothing is written in Access Database. No error message. Simply nothing happens in database. Philip "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> a écrit dans le message de news: OLspCtLJGHA.1***@TK2MSFTNGP11.phx.gbl...Show quoteHide quote > Philip, > > I wrote this one. > >> Yes I tried what you write, adding the line you asked me to add when I >> add "Me.BindingContext essaiBindingSource).EndCurrentEdit()" > > BindingContext(StarDvdDataDataSet.artistes).EndCurrentEdit() > > I am curious what it says when it does not accept that one? > > Cor > Philip,
You did not try it as I wrote. The bindingContext is a collection of bindings. If you tell that one of those has an endCurrentEdit, than he will accept it. However it does than nothing at your datatable that you want to update as that is not the same. What is the DataSource property of your datagridview, than I can probably write the code exact Cor The datasource property of the datagridview is 'EssaiBindingSource'
When I drag the table 'Essai' on a form, vsStudio 2005 create a datagridview1 He creates a bd11Dataset, an EssaibindingSource, an EssaiTableAdapter, and an EssaiBindingNavigator. Precision for you to give context. For information, the connectionstring of database is 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\vb2005\WindowsApplication1\WindowsApplication1\bd11.mdb' Thanks for your attention. Philip "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> a écrit dans le message de news: eRnmiGMJGHA.1***@TK2MSFTNGP11.phx.gbl...Show quoteHide quote > Philip, > > You did not try it as I wrote. > > The bindingContext is a collection of bindings. If you tell that one of > those has an endCurrentEdit, than he will accept it. However it does than > nothing at your datatable that you want to update as that is not the same. > > What is the DataSource property of your datagridview, than I can probably > write the code exact > > Cor > Philip,
Can you explain a little bit more how you do this, I thought you was everything doing in code. > When I drag the table 'Essai' on a form, vsStudio 2005 create a You drag from ? .............etc.> datagridview1 > He creates a bd11Dataset, an EssaibindingSource, an EssaiTableAdapter, and > an EssaiBindingNavigator. Cor - Menu 'File/New project'
- Menu 'Data/Show Data Sourcess' - Hyperlink 'Add New Data Source' - I make new connection to Access Dabase following 'Data source configuration wizard' - To the end of this process, I take table 'essai' in panel 'Data Sources' and I drag it and drop on form 'form1' - VStudio 2005 creates a 'BD11Dataset' based on my Access Database structure (here a table with an autoincrement field, and two text fields). Property of BD11Dataset is 'IncludeSchema' - Then creates a 'EssaiBindingSource' : DataMember = 'essai' DataSource = 'Bd11DataSet' - Then creates a 'EssaiTableAdapter', and a 'EssaiBindingNavigator' whose BindingSource is 'EssaiBindingSource' In code of 'EssaiBindingNavigator' I have the following code written not by me, but by VStudio : ---------------------------------------- Public Class Form1 Private Sub EssaiBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EssaiBindingNavigatorSaveItem.Click Me.Validate() Me.EssaiBindingSource.EndEdit() Me.EssaiTableAdapter.Update(Me.Bd11DataSet.essai) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'Bd11DataSet.essai' table. You can move, or remove it, as needed. Me.EssaiTableAdapter.Fill(Me.Bd11DataSet.essai) End Sub End Class ----------------------------------------------------- I added a 'Try-End Try' verification to the 'EssaiBindingNavigatorSaveItem' subroutine. The method 'fill' functions perfectly. The method 'Update' does'nt function. BUT I created a button on the form with this code, which functions perfectly : Using connection As New ------------------------- System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\vb2005\WindowsApplication1\WindowsApplication1\bd11.mdb") Dim Commnd As New System.Data.OleDb.OleDbCommand("INSERT INTO essai (nom,prénom) VALUES ('ae','ea')", connection) Commnd.ExecuteNonQuery() End Using ------------------------ A line is added to my Access database. So the problem is not a system problem between Access Database and VStudio. A lot of thanks to give me your time. When you think I Exaggerate, say it. Philip,
I have tried exactly the same as you (with employees from northwind in a way I can do it in code), and it does as well nothing. I never used so far the designer. I will see if I can look tomorrow what it does with SQL server to see if this is an oledb bug. Cor Thanks. Very sincerely.
I wait some news when you can. It's so important for me! Philip "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> a écrit dans le message de news: unXT%23LRJGHA.***@TK2MSFTNGP12.phx.gbl...Show quoteHide quote > Philip, > > I have tried exactly the same as you (with employees from northwind in a > way I can do it in code), and it does as well nothing. I never used so far > the designer. > > I will see if I can look tomorrow what it does with SQL server to see if > this is an oledb bug. > > Cor > Philip,
I found it, you have probably while using the wizard told to copy the database to your project. If I did not do that, than it was working fine for me. I hope this helps, Cor You are a genious ! That works.
My last question : Why the fact to displace database create this problem ? The response to this question will do than I shall can avoid a serious error later. This is my last question. But now, I can work on my project. A great lot of thanks. Philip "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> a écrit dans le message de news: e7utnnWJGHA.***@TK2MSFTNGP15.phx.gbl...Show quoteHide quote > Philip, > > I found it, you have probably while using the wizard told to copy the > database to your project. > > If I did not do that, than it was working fine for me. > > I hope this helps, > > Cor > I seen on Google what MVP means.
Congratulations. I did not know I work with Access for many years. I believed that I understood the new concept of dataset and tableadapter, but my problem reveals that I did not understand anything. I think dotnet and specially vsstudio 2005 is a very good thing, but I need to write in a database really a first time at least to continue seriously to work with this new technology. Philip "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> a écrit dans le message de news: OAT46kKJGHA.***@TK2MSFTNGP09.phx.gbl...Show quoteHide quote > Philip, > > Did you try what I wrote as well? > > Cor > > "philip" <p***@philippe.com> schreef in bericht > news:43dbb140$0$21293$8fcfb975@news.wanadoo.fr... >> Thanks for uyour help >> >> I added the line : Me.BindingContext(EssaiBindingSource).EndCurrentEdit() >> to try if "Me.EssaiBindingSource.EndEdit() >> " is not enough : >> >> Private Sub EssaiBindingNavigatorSaveItem_Click(ByVal sender As >> System.Object, ByVal e As System.EventArgs) Handles >> EssaiBindingNavigatorSaveItem.Click >> Try >> Me.Validate() >> Me.EssaiBindingSource.EndEdit() >> Me.BindingContext(EssaiBindingSource).EndCurrentEdit() >> Me.EssaiTableAdapter.Update(Me.Bd11DataSet.essai) >> System.Windows.Forms.MessageBox.Show("Success !") >> Catch ex As Exception >> System.Windows.Forms.MessageBox.Show(ex.Message) >> End Try >> End Sub >> >> Nothing happened. Access database has not changed. Modifications are >> always good in dataset, but not transmitted to Access Dababase. >> >> And this time, I use a very little database with only one table with only >> three fields : 1 autoincrement field, ans 2 text fields. >> And there is one row (line) of data in table, writen directly in Access >> (because I cannot do it in Visual Studio 2005). >> I have created this database specially for resolving my problem, to be >> sure that no relation troubled the process. >> >> Curious thing : >> One of the two text fields are declared as unique (both in Access >> database, and dataset structure in vsstudio). >> My table as only one line ans I try to add a new line. If I write a line >> with the same value as the first for this unique field, I have the waited >> message "Column 'Nom' is constrained to be unique". >> If I give 'false' to the unique property of this field in Dataset >> Designer, letting unique in Access table, I have the message of Access >> (in french, it's a french version of Access) : "Risque de doublons". >> Access detects the unique problem. So he TRIES to write in database. >> >> BUT IT'S IMPOSSIBLE TO WRITE A SECOND LINE IN TABLE from Visual Studio >> 2005, EVEN IF I GIVE GOOD DATA (not unique) FOR THE SECOND LINE. >> The Dataset creates line, takes data, but tableAdapter cannot write it in >> database. >> >> Do you see another reason for this impossibility to write in database ? >> >> If someone of Microsoft can examine the problem, he is welcome. Because >> today I don't like Microsoft. -) >> >> "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> a écrit dans le message >> de news: e%23BcxRBJGHA.2***@tk2msftngp13.phx.gbl... >>> Philip, >>> >>> There are not much people who write "probleme" as you do. However this >>> is an International newsgroup, so we understand a lot even if it is in >>> not correct English. >>> >>> What you probably need is just the endcurrentedit, that pushes the data >>> down in the datasource. >>> >>> Probably with your strongly typed dataset if that is the datasource. >>> >>> BindingContext(StarDvdDataDataSet.artistes).EndCurrentEdit() >>> >>> I hope this helps, >>> >>> Cor >>> >>> >>> "philip" <p***@philippe.com> schreef in bericht >>> news:43db6d9b$0$18304$8fcfb975@news.wanadoo.fr... >>>> On a form, I have a datagridview. >>>> This datagridview is constructed on a dataset filled by a tableadapter. >>>> The table adapter do very well what it must do when filling dataset. >>>> Insertions, modifications and deletions functions very well in the >>>> dataset. >>>> But impossible to transmit modifications in ACCESS database. Impossible >>>> to WRITE in database. >>>> >>>> Here is the code for data transmission from tableadapter to Access >>>> database : >>>> >>>> Private Sub ArtistesBindingNavigatorSaveItem_Click(ByVal sender As >>>> System.Object, ByVal e As System.EventArgs) Handles >>>> ArtistesBindingNavigatorSaveItem.Click >>>> Try >>>> Me.Validate() >>>> Me.ArtistesBindingSource.EndEdit() >>>> >>>> Me.ArtistesTableAdapter.Update(Me.StarDvdDataDataSet.artistes) >>>> System.Windows.Forms.MessageBox.Show("Success !") >>>> Catch ex As Exception >>>> System.Windows.Forms.MessageBox.Show(ex.Message) >>>> End Try >>>> End Sub >>>> >>>> Program says "Success !" but nothing has changed in access database. >>>> >>>> May be I am stupid, but I don't understand ! >>>> >>>> Please help me. >>>> Excuse me for my english. I'm french. >>>> >>> >>> >> >> > >
Odd or Even
Whats's the problem using a enum like this? Is It Possible to Retrieve a List of Declared Variables? How to: Retrieving BuiltinDocumentProperties from Word Document Inheritance and function issue late binding problem with option strict FileDownload with WebBrowser Control - disable the Save? What happen to Find in Files in VS2005? Hpow to create a background process/application? WithEvent |
|||||||||||||||||||||||