473,786 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bound Data Saving Problem in Access 2003

59 New Member
Hi All,

I have an Access Db Table Called Employees. The columns are as follows:

  1. EmployeeId (Autonumber) PK
  2. EmployeeName (Text)
  3. EmployeeRole (Test)
  4. DateOfJoining (DateTime)


I am displaying the data in a simple DataGridView in a winform by using the following code:

Expand|Select|Wrap|Line Numbers
  1. da.Fill(ds,"Employee")
where da is the OledbDataAdapte r and ds is the DataSet.

Next is the simple code of binding:

Expand|Select|Wrap|Line Numbers
  1. dgv.DataSource=ds.Tables["Employee"];
Here dgv is the dataGridView. I have used a command builder object to create the Insert/Update/Delete commands for the DataAdapter da.

However when I try to Update the Added record in the dataBase using:

Expand|Select|Wrap|Line Numbers
  1. da.Update(ds.Tables["Employee"]
it gives an error. I realise I need to define the insert command for the DataAdapter da, seperately. I tried searching in internet but could not locate something.
Can someone guide me to such page or suggest a solution for the problem?

Regards
Feb 27 '09 #1
0 990

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

Similar topics

3
1738
by: Kenneth Courville | last post by:
Hello, This problem has been a little unusual for me. I have an Access database, and, on several forms, I've seen this issue occur wotj listbox and combobox controls. Basically, I'm just putting either control on a form to serve as a look-up to a table for a field on that form. It seems that, very intermittently, the controls will not populate with data.
2
3874
by: CSDunn | last post by:
Hello, I have an MS Access 2003 Project form in which I need to set the value of a textbox named 'TestGrade' to the value present after the update of a combo box currently named 'Combo6'. The data source for the project is a SQL Server 2000 database. I have the following code written for the 'After Update' event of 'Combo6' Private Sub Combo6_AfterUpdate()
19
4109
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate the code that implements managing unbound controls on forms given the superior performance of unbound controls in a client/server environment. I can easily understand a newbie using bound controls or someone with a tight deadline. I guess I need...
4
1898
by: Deano | last post by:
There's an interesting chapter on this in the Access 2000 Developer's Handbook (chapter 8) but I'm trying to rework the code so the user has the option of saving changes or rolling them back. There is a boolean transaction variable that tracks whether the code is in a transaction. If this is true the unload event fires and asks if changes should be saved. However this will also fire if the user *hasn't* made any changes. So is it...
2
1827
by: manning_news | last post by:
Has anyone had a problem with Access 2003 not saving their coding? I've been using 2003 for a couple of months now and just this week noticed that some coding I'd done for a database was not there anymore. I reentered it and didn't have any problems for a couple of days. Today I entered some coding, saved it, opened another database, and when I opened my original database again, the coding I had entered was missing. Access 2000 always...
11
4763
by: rkershberg | last post by:
Recently converted the entire office to Access 2003 as a by-product of upgrading all users to XP sp2 and Office 2003. My performance on the Access 2003 datasheet view of a bound (to an underlying SQL Server view) is so slow the application now is unusable. There must be some additional settings that I am not aware of (I wrote all of the code on the back end .. and it has been optimized and runs extremely well). Current environment is...
0
2018
by: Frnak McKenney | last post by:
Can I use a bound ComboBox for both browsing and editing? I'm working on a small, standalone database application using Visual C#.NET 2003 and an Access data file. In order to keep the number of different screens down to a minimum, I'm trying to use the same Windows Forms for both browsing and for updating. This works fine for TextBoxes, but I'm running into problems with my DropDownLists (ComboBoxes).
18
8089
by: marylipscomb | last post by:
I am new at the whole Access thing, and recently got a new job. I am creating my first database. I did so in Access 2003. My problem is, I have 10 tables, and I created a tab form with 6 tabs on it. When I enter data on the form/subforms I go out of it and go back into, all my data in the forms are gone. They are in the table though. Can someone please help me. I am sooo new to all this. It is saving to the table but not the subforms. It is...
7
5771
by: semijoyful | last post by:
OS: Win XP SP2 Access version: 2003 Excel version: 2003 I am new at this, as I am sure you have gathered from this post title:) I am working on a form where users can input data in Access and at the end of the day be able to press a button on the form that would update that data to a single exel spreadsheet. The following is the code for the module. When I click on the button in the form, It takes me to VBS Debugger. I then type...
0
9650
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7515
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6748
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.