I have a textbox driven windows form in C# whose values corresponding to rows of a dataset being filled from a database table. When the user clicks the Insert button, I want to add a new row with values entered by the user.
After the user has finished entering a new record, I want to update the...
I have a textbox driven windows form created in C# and linked to a dataset. On the form, I have an add button that should allow the user to add a new record. How do I create a new record in the dataset which would be updated with values from the user?
I tried the following:
/// <summary>
///...
Hi all,
I am getting the following error when trying to update database table:
"Error: Update unable to find TableMapping['Table'] or DataTable 'Table'.
Here is the code snippet that is throwing the error (specifically, the Update() command )
if (upDateFlag)
{
//update
SqlConnection...
Hi all,
I am getting this error when I am trying to print my windows form:
"Unable to find the report in the manifest resources. Please build the project and try again."
My report used to print fine before.Can anybody please provide me information on this error or point me where I can find...
I have a print button on my form and I want to directly print a report created in Crystal Reports when the user clicks this print button.
Can this be done? How??
Is there a way to capture error messages being displayed due to constraints enforced at the table-level which are not taken care of in code ?
I have a columnchanging method which does not get fired when a cell value is not changed (ie remains null). I cannot capture this event in code and I was...
How do I get the value of a cell in a datagrid when the user goes to the next cell?
I have a ColumnChanging event but it would not be fired when the value of the cell is not changed. I want to handle exactly this case !!
Please help.
Hi all,
I have a ColumnChanging event attached to a dataset to perform validations. For some reason unknown to me, the event does not get fired when the user presses the 'tab' key with a null cell.
I am trying to make sure that no cell is null. When no value is entered in a cell, and the...
I am having some problems figuring out the following:
1) Updating database with changes to dataset on Form Closing
Here is my form closing method:
private void DivFrmClosing(object sender, System.ComponentModel.CancelEventArgs e)
{
int i;
if (dataSet11.HasChanges())
i = dbUpdate(); //...
I want to ensure that the changes made to a dataset are updated to the table when the form is closed so that any uncommitted changes are taken care of. Here is my form closing event method -->
private void DivFrmClosing(object sender, System.ComponentModel.CancelEventArgs e)
{
DataSet...
Hi all,
I have a dataset and I want to ensure that the user enters 2 characters for the first column. How do I do this?
I used MaxLength -->
dataSet11.Division.Div_CodeColumn.MaxLength = 2;
but this allows input of characters at most 2 characters in length ie it allows input that is less...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.