How can i save the data in the database using the BindingSource?

G

giannis

I am a newbie with VB.
I'm trying to add a new row to my database using the BindingSource.
I use the AddNew() and EndEdit() methonds but my changes dont
saved at my database ...
What is wrong ? How can i save my changes in the database (datasourse) ?
Some code it will acceptable.
Sorry for my english and thank you !
 
C

ClayB

Are you using DataTables, DataSets and DataAdapters to load your data
into your application? If so, you would call dataAdapter1.Update to
save your changes back to the database.
===================
Clay Burch
Syncfusion, Inc.
 
G

giannis

ClayB said:
Are you using DataTables, DataSets and DataAdapters to load your data
into your application? If so, you would call dataAdapter1.Update to
save your changes back to the database.

I have write :
BindingSource.EndEdit()
Me.TABLETableAdapter.Update(Me.DataSet.TABLE)

but the data dont saved at the database.

Can you give me an example please ?

Thank you !
 
R

RobinS

giannis said:
I have write :
BindingSource.EndEdit()
Me.TABLETableAdapter.Update(Me.DataSet.TABLE)

but the data dont saved at the database.

Can you give me an example please ?

Thank you !

What type of database are you using? SQLServer, SQLServerEXpress, Access?

Robin S.
 

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