473,387 Members | 1,561 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,387 software developers and data experts.

this.DataTableAdaper.Update(Dataset) does not work...

Sl1ver
196 100+
i created the dataset's bindings and everything using visual studio 2008 and on a access database, not i want to be able to work on both access and sql.

im doing the update function to basically "post" my data to the db just so that i can use that data afterwards to do other functions to my other grid.

how can i add the row on BeforeRowLeave so that the data gets posted and bool value sets to true and my other function implements?

Expand|Select|Wrap|Line Numbers
  1.  DataSet ds = this.dsRole.GetChanges();
  2.                 if (ds != null)
  3.                 {
  4.                     try
  5.                     {
  6.                         this.qx_RoleTableAdapter.Update(this.dsRole.qx_Role);
  7.                     }
  8.                     catch (OleDbException ex)
  9.                     {
  10.                         MessageBox.Show("Error" + ex.ToString());
  11.                     }
  12.                 }
  13.  
  14.  
  15.                 roleEndEdit = true;
  16.             }
  17.  
  18.  
  19.             if (roleEndEdit == true)
  20.             {
  21.                 insertRoleRights();
  22.             }
  23.  
the best of all is that it says it has invalid data, how is that possibleif i just add text to the fields that was assigned to text in access and converted the whole db to sql. Would i need to change the datatype in sql or not?
Jan 13 '10 #1
0 1087

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

Similar topics

1
by: John Moore | last post by:
Hi, I normally work with Java but I'm interested in using Python as well, particularly for little tasks like doing some massaging of data in a MySQL database. Below is my first attempt. I'm sure...
44
by: Bamber | last post by:
Why does f get returned ? (compiled with gcc). #include<stdio.h> int func(int a); main() { int f; f=func(7); printf("f=%d",f);
1
by: Happy | last post by:
hi how to update dataset's row thru code i got the new row as a data row in which the primary key remains the same but was unable update the non primary keys Thanks in Advance
1
by: Marisha | last post by:
Hi Guys, I have some question, I have datadrid that bound to dataset,the data in data set filled from text file (not from database) User may update some data in datagrid,then I need to update...
0
by: Samy | last post by:
Hi There, I am trying to trace the block of code which had adapter.update(dataset). The adapter has the insert, update and delete commands defined on them along with the select command. Is there a...
1
by: Happy | last post by:
hi how to update dataset's row thru code i got the new row as a data row in which the primary key remains the same but was unable update the non primary keys Thanks in Advance
1
by: Manuel Canas | last post by:
Hey guys, This code was posted by Cor Ligther some rows below here. hey bud if you read this one can you help me out here or anybody that know the answer to this one. How would I add a second...
1
by: GS | last post by:
Hello, I used Visual Data Designer to design dataset based on table from SQL database. I made a change to database (increased length of some columns) but my dataset is still the same. Any way to...
0
by: shamaila | last post by:
i m using dataadapter to handle dataset..the date is shown in the datagrid..now i want to update the records edited by the user i have used one button to show the records,(in which i hv declared...
0
by: frodenekkoy | last post by:
Hi! Have a dataset that I need to populate with 4 datatables. The name of the datatables needs to be Tag2. This is because I need to return the data as xml in this specific format...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.