Click here to Skip to main content
15,893,814 members
Home / Discussions / C#
   

C#

 
GeneralRe: Execution Problem Pin
DeepOceans14-Nov-07 23:29
DeepOceans14-Nov-07 23:29 
GeneralRe: Execution Problem Pin
Adeel Chaudhry14-Nov-07 23:35
Adeel Chaudhry14-Nov-07 23:35 
GeneralRe: Execution Problem Pin
Luc Pattyn15-Nov-07 1:49
sitebuilderLuc Pattyn15-Nov-07 1:49 
GeneralRe: Execution Problem Pin
DeepOceans15-Nov-07 20:44
DeepOceans15-Nov-07 20:44 
GeneralRe: Execution Problem Pin
Luc Pattyn16-Nov-07 2:37
sitebuilderLuc Pattyn16-Nov-07 2:37 
GeneralRe: Execution Problem Pin
DeepOceans19-Nov-07 1:01
DeepOceans19-Nov-07 1:01 
GeneralRe: Execution Problem Pin
Luc Pattyn19-Nov-07 1:21
sitebuilderLuc Pattyn19-Nov-07 1:21 
QuestionChristian Graus can you help me with this? Pin
MumbleB14-Nov-07 21:40
MumbleB14-Nov-07 21:40 
Hi. I have posted this message a number of times and nobody seems to be able to help me or advise me and I need a bit of guidance. I am sorry for having to call on you direct but I think you may be the only one that will be able to answer me or help me.

Firstly, I would only like to export the records that are marked as N in the Exported Column in my DB. Then, as the record is exported I would like to mark the record as Y to show that it has been exported. This is so that it doesn't get re-exported next time round. How do I do this?

private void toolStripButton2_Click(object sender, EventArgs e)
{
    //Write Header Record
    StreamWriter sw = new StreamWriter(@"C:\nefz" + DateTime.Today + ".csv", false);
    DataTable dt = m_dtCallCentre;
    int iColCount = dt.Columns.Count;
    for (int i = 0; i < iColCount; i++)
    {
        sw.Write(dt.Columns[i]);
        if (i < iColCount - 1)
        {
            sw.Write(";");
        }
    }
    sw.Write(sw.NewLine);
    //Write all records in the DB
    foreach (DataRow dr in dt.Rows)
    {
        for (int i = 0; i < iColCount; i++)
        {
            if (!Convert.IsDBNull(dr[i]))
            {
                sw.Write(dr[i].ToString());
            }
            if (i < iColCount - 1)
            {
                sw.Write(";");
            }
        }
        sw.Write(sw.NewLine);
    }

    sw.Close();

}

AnswerRe: Christian Graus can you help me with this? Pin
Christian Graus14-Nov-07 21:53
protectorChristian Graus14-Nov-07 21:53 
GeneralRe: Christian Graus can you help me with this? Pin
MumbleB14-Nov-07 22:01
MumbleB14-Nov-07 22:01 
GeneralRe: Christian Graus can you help me with this? Pin
Christian Graus14-Nov-07 22:12
protectorChristian Graus14-Nov-07 22:12 
AnswerRe: Christian Graus can you help me with this? Pin
J4amieC14-Nov-07 22:36
J4amieC14-Nov-07 22:36 
GeneralRe: Christian Graus can you help me with this? Pin
Christian Graus14-Nov-07 22:41
protectorChristian Graus14-Nov-07 22:41 
GeneralRe: Christian Graus can you help me with this? Pin
J4amieC14-Nov-07 22:44
J4amieC14-Nov-07 22:44 
QuestionProblem in opening external program using C# Pin
sahadewa_kbe14-Nov-07 21:38
sahadewa_kbe14-Nov-07 21:38 
AnswerRe: Problem in opening external program using C# Pin
Christian Graus14-Nov-07 21:49
protectorChristian Graus14-Nov-07 21:49 
AnswerRe: Problem in opening external program using C# Pin
sahadewa_kbe18-Nov-07 17:02
sahadewa_kbe18-Nov-07 17:02 
Questionhow can i compare two word files bit to bit, in C# Pin
jayee714-Nov-07 21:06
jayee714-Nov-07 21:06 
AnswerRe: how can i compare two word files bit to bit, in C# Pin
Christian Graus14-Nov-07 21:29
protectorChristian Graus14-Nov-07 21:29 
QuestionHow was life before C#? Pin
kingletas14-Nov-07 20:36
kingletas14-Nov-07 20:36 
AnswerRe: How was life before C#? Pin
Christian Graus14-Nov-07 21:39
protectorChristian Graus14-Nov-07 21:39 
AnswerRe: How was life before C#? Pin
Adeel Chaudhry14-Nov-07 22:02
Adeel Chaudhry14-Nov-07 22:02 
AnswerRe: How was life before C#? Pin
Rudolf Jan15-Nov-07 0:41
Rudolf Jan15-Nov-07 0:41 
AnswerRe: How was life before C#? Pin
Luc Pattyn15-Nov-07 1:57
sitebuilderLuc Pattyn15-Nov-07 1:57 
GeneralRe: How was life before C#? Pin
kingletas15-Nov-07 9:09
kingletas15-Nov-07 9:09 

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.