G
Guest
I know this is probably a stupid question but I can't find any threads anywhere regarding this
I have a SQL table that has largely char type columns and I use the following code to add a new row
Once added, all the fields in the new row are filled up to their limit with trailing spaces. So a 5 character field should read as "Test", it's actually being saved as "Test ". When I use an update procedure (for editing a row) it doesn't do this
What am I doing wrong
Any help would be greatly appreciated
DataRow oDr1 = oDs1.Tables["DIDH"].NewRow();
DataColumnCollection oDc1 = oDs1.Tables["DIDH"].Columns
int iTotCol = oDc1.Count
for (int i=1;i<iTotCol;i++
oDataRow = txtArray1.Text.Trim();
oDs1.Tables["DIDH"].Rows.Add(oDr1)
oOleDtAd.Update(oDs1,"DIDH")
oDs1.AcceptChanges()
I have a SQL table that has largely char type columns and I use the following code to add a new row
Once added, all the fields in the new row are filled up to their limit with trailing spaces. So a 5 character field should read as "Test", it's actually being saved as "Test ". When I use an update procedure (for editing a row) it doesn't do this
What am I doing wrong
Any help would be greatly appreciated
DataRow oDr1 = oDs1.Tables["DIDH"].NewRow();
DataColumnCollection oDc1 = oDs1.Tables["DIDH"].Columns
int iTotCol = oDc1.Count
for (int i=1;i<iTotCol;i++
oDataRow = txtArray1.Text.Trim();
oDs1.Tables["DIDH"].Rows.Add(oDr1)
oOleDtAd.Update(oDs1,"DIDH")
oDs1.AcceptChanges()