2
Answers

Double quotes problem

Ankit  Shukla

Ankit Shukla

7y
183
1
Hello,
 
        I am inserting value 36-48"  in database table. But it inserts "36-48"""
Same as  1/2 Standard Dis. Heavy (90cm/36" Stem) inserts as "1/2 Standard Dis. Heavy (90cm/36"" Stem)".
 
Please help to solve this. How can I insert exact data in sql table? 
Answers (2)
0
aeroswan

aeroswan

NA 18 0 20y
yes,that's right. when you execute the acceptchanges method, the DataRow's RowState property will change from Added orModified to Unchanged. so DataAdapter will not get the changes.
0
eksypnos123

eksypnos123

NA 65 0 20y
yep it works, thanks. it seems that the ds.AcceptChanges unmarks the rows that are modified, so the da soes nothing if it's called after.
0
aeroswan

aeroswan

NA 18 0 20y
i have encountered the same problem,and you can solve it by changing the sequence of the last two rows of codes. ......... ......... ds.Tables[0].Rows[0]["LastName"]="Smith"; da.Update(ds,"Employees"); ds.AcceptChanges(); i have tried it in oracle,and it works.