Urgent Help needed,

I am updating an access database using C#. Everything works fine except when there are multlines in text box controls, update command doesnot update these textboxes to text field or memo field. On screen I have a grid from the same datasource as that of the textbox where the change is reflected an appears in multi lines. On updation the text boxes with multiline is not updating the fields. If its a single line on these fields it gets updated.
I use oledb dataadapter, datasource and dataview and updation is done by calling the

DataTable ds3 = myDataSet.Tables["Listing"].GetChanges(DataRowState.Modified);

myDataAdapter2.UpdateCommand = myCommandBuilder2.GetUpdateCommand();

if (ds3 !=null)
    {
        myDataAdapter2.Update(ds3);
        ds3.Dispose();
    }
DataAdapter2.Update 

Thanx
Aroop

Upload a sample project demonstrating this behavior

Upload a sample project demonstrating this behavior

Dear sknake,

Thank you very much for your prompt reply, I have found out the issue. Since you wanted a sample, I just thought to have second check, it was discovered that

after changing the field if I move to another record and press update it was working fine. So I changed my code to move to last record the UPDATE command, again back to modified record.
I dont know whether this is the right way, but it works.

Thanx once again

It sounds like you're not calling .BeginEdit() and .EndEdit() on the row while you're updating it -- and moving the row cursor does that for you under the hood. Try it and see if that fixes your issue.

Please mark this thread as solved since you have found the answer to your original problem and good luck!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.