Click here to Skip to main content
15,924,935 members
Home / Discussions / C#
   

C#

 
GeneralRe: xml Pin
Nick Parker30-Jun-04 18:16
protectorNick Parker30-Jun-04 18:16 
GeneralRe: xml Pin
Nick Parker30-Jun-04 18:15
protectorNick Parker30-Jun-04 18:15 
GeneralCheckedListBox Pin
ahmed mohamed abdelhameed30-Jun-04 16:13
ahmed mohamed abdelhameed30-Jun-04 16:13 
GeneralRe: CheckedListBox Pin
saud_a_k30-Jun-04 23:39
saud_a_k30-Jun-04 23:39 
GeneralRe: CheckedListBox Pin
Robert Rohde1-Jul-04 19:26
Robert Rohde1-Jul-04 19:26 
GeneralUpdating access file Pin
benglish7230-Jun-04 15:22
benglish7230-Jun-04 15:22 
GeneralRe: Updating access file Pin
cmarmr30-Jun-04 17:05
cmarmr30-Jun-04 17:05 
GeneralRe: Updating access file Pin
benglish7230-Jun-04 18:03
benglish7230-Jun-04 18:03 
Hi, here's some code, it basically removes unwanted characters that may be in string fields in a table, then tries to save the changes to the table. I've tried a few different variations, but none seem to work. Either I get an exception or it seems to work, but the file is unchanged.
Thanks.

statusBar.Text = "Cleaning "+sDataFile+"...";
if(m_dataSet!=null)
{
m_connection.Open();
Int32 iCount = m_dataSet.Tables["table"].Rows.Count;
for(Int32 i=0;i<icount;i++)
{
="" application.doevents();
="" int32="" ilength="m_dataSet.Tables["table"].Rows[i].ItemArray.Length;
" for(int32="" iindex="0;iIndex<iLength;iIndex++)
" m_dataset.tables["table"].rows[i].beginedit();
="" if(m_dataset.tables["table"].rows[i].itemarray[iindex].gettype()="=typeof(String))
" string="" schanged="null;
" sitem="(String)m_dataSet.Tables["table"].Rows[i].ItemArray[iIndex];
" if(sitem!="null)
" somehow="">>;
if(sChanged.CompareTo(sItem)!=0)
{
iChanges++;
statusBar.Text = "Cleaning "+sDataFile+" - Number of Changes: "+iChanges.ToString();
m_dataSet.Tables["table"].Rows[i].ItemArray[iIndex]=sChanged;
}
}
}
m_dataSet.Tables[sTable].Rows[i].EndEdit();
}
}
if(m_dataSet.HasChanges(DataRowState.Modified)==true)
{
DataSet dataChanged = m_dataSet.GetChanges();
m_dataAdapter.Update(dataChanged,sTable);
m_dataSet.AcceptChanges();
}
m_connection.Close();
}
}


"Ergo huffabo et puffabo et tuam domum inflabo" ait magnus malus lupus.
GeneralRe: Updating access file Pin
Heath Stewart30-Jun-04 18:17
protectorHeath Stewart30-Jun-04 18:17 
Generallaunch batch file Pin
Rob Tomson30-Jun-04 14:30
Rob Tomson30-Jun-04 14:30 
GeneralRe: launch batch file Pin
Anders Molin30-Jun-04 14:58
professionalAnders Molin30-Jun-04 14:58 
GeneralRe: launch batch file Pin
Heath Stewart30-Jun-04 18:20
protectorHeath Stewart30-Jun-04 18:20 
GeneralDrawing Rectangles on top of multiple controls Pin
theoutlander30-Jun-04 11:28
theoutlander30-Jun-04 11:28 
GeneralStreaming Audio Pin
Grimolfr30-Jun-04 9:39
Grimolfr30-Jun-04 9:39 
Questionwill there be a Standard Edition? Pin
SJ_Phoenix30-Jun-04 9:26
SJ_Phoenix30-Jun-04 9:26 
AnswerRe: will there be a Standard Edition? Pin
Judah Gabriel Himango30-Jun-04 9:58
sponsorJudah Gabriel Himango30-Jun-04 9:58 
GeneralRe: will there be a Standard Edition? Pin
Heath Stewart30-Jun-04 18:23
protectorHeath Stewart30-Jun-04 18:23 
GeneralCalling Java from C# Pin
BrcKcc30-Jun-04 9:14
BrcKcc30-Jun-04 9:14 
GeneralRe: Calling Java from C# Pin
Judah Gabriel Himango30-Jun-04 10:06
sponsorJudah Gabriel Himango30-Jun-04 10:06 
GeneralRe: Calling Java from C# Pin
Heath Stewart30-Jun-04 18:30
protectorHeath Stewart30-Jun-04 18:30 
Questionjavadoc-style document generator for .NET? Pin
drizzay30-Jun-04 8:43
drizzay30-Jun-04 8:43 
AnswerRe: javadoc-style document generator for .NET? Pin
Heath Stewart30-Jun-04 8:50
protectorHeath Stewart30-Jun-04 8:50 
GeneralRe: javadoc-style document generator for .NET? Pin
steven shingler30-Jun-04 12:30
steven shingler30-Jun-04 12:30 
Generalerror could not access cdo.message Pin
VIJAYPAPUPAGER30-Jun-04 8:28
VIJAYPAPUPAGER30-Jun-04 8:28 
GeneralRe: error could not access cdo.message Pin
Nick Parker30-Jun-04 8:36
protectorNick Parker30-Jun-04 8:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.