473,320 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Adapter.Update not working

1
Hi,

I'm trying to build a database application in Visual Studio 2005 express Edition. Using Visual Basic, and a sample Access database, I created a new Windows Application, added a database, created a table, and then used the Configure Dataset wizard to create a tableset with the new table Table 1.

I dragged the tableset into the form, and Visual Studio 2005 created all the links, adapter, binging and dataset. But the problem is, the Save button in the Binding Navigator control doesn't work. It doesn't give an error, but when I close
the form and open the table to view its data, I can't find the newly entered
data.

I tried it on a windows XP machine and a Vista installed one, same issue.

Any ideas why it is not saving?

Thanks very much.
Shef


Here is the code for the form;
======================================

Public Class Form1

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 'NwindDataSet1.Categories' table. You can move, or remove it, as needed.
Me.CategoriesTableAdapter.Fill(Me.NwindDataSet1.Ca tegories)


End Sub

Private Sub CategoriesBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.Validate()
Me.CategoriesBindingSource.EndEdit()
Me.CategoriesTableAdapter.Update(Me.NwindDataSet1. Categories)

End Sub

Private Sub CategoriesBindingNavigatorSaveItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

CategoriesBindingNavigatorSaveItem.Click
Me.Validate()
Me.CategoriesBindingSource.EndEdit()
Me.CategoriesTableAdapter.Update(Me.NwindDataSet1. Categories)

End Sub
End Class
Jun 10 '07 #1
0 955

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: compuglobalhypermeganetz0r | last post by:
I am having trouble getting an adapter to update my access database, it gives the error Syntax error in INSERT INTO statement. for Line 98: Adapter.Update(WineDS, "tblWines") Below is my...
1
by: | last post by:
I will be add Data in my Example Database. I have this Code by a ASP.NET Book but this will not work. Error message: Operation must be a actually Query use. Error in:...
7
by: GatorBait | last post by:
Hi all, I am having a problem with my data adapter update command. I have generated the data adapter in the IDE and then I built a dataset. The dataset can get changed in the program and I...
1
by: Adam | last post by:
This is kind of a tough question, but, I'm working on a program now and using sql data adapters with sql server to generate data tables. I'm updating the tables and then using the...
1
by: cindy | last post by:
this is the call private void Page_Load(object sender, System.EventArgs e) { OdbcConnection connection = new OdbcConnection ("DSN=PFW52"); CreateDataAdapter(connection); } this is the code,...
2
by: travhale | last post by:
in a new project using .net 2005, c#. getting err message "Update requires a valid UpdateCommand when passed DataRow collection with modified rows." source RDBMS is oracle 8i. I add a new...
3
by: optictygre | last post by:
Hi folks. I have a couple questions about updating data from a dataset to a database using a data adapter. If I declare an adapter, set the batchupdatesize property to 0, and then call the...
0
by: mwenz | last post by:
I am trying to update an Access table using OLEDB in VB.Net 2005. I can add rows but I cannot update them. Code to instantiate the Access database and table... Dim conn As New...
3
by: tommydnp | last post by:
When I use an adapter.update(dataset, "myTable"), I get the following error: System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the...
6
by: insirawali | last post by:
Hi all, I have this problem, i need to know is there a way i cn use the data adapter's update method in this scenario. i have 3 tables as below create table table1{ id1 int identity(1,1)...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.