HuntingNet.com Forums - View Single Post - 36- Team"Bro's B4 Does" Official Thread
Old 12-21-2006 | 11:56 AM
  #961  
Germ's Avatar
Germ
Boone & Crockett
 
Joined: Sep 2005
Posts: 11,682
Likes: 0
From: Michigan/Ohio
Default RE: 36- Team"Bro's B4 Does" Official Thread

Captain I wrote my first program at age 11, I ran the computer lab at my HS. I also had my own company for Small business owners in College. Was not too much a Prof was going to teach me, I was born to be a nerd, LOL

My wife who has her Masters got 1 A- in college. She is such a brown noser, LOL She starts her PHD I think next fall.

I have 5 certifications from Microsoft, and each one brings about 5 grand more in salary. Never ever stop learning!!!


Look page 97, LOL

Captain here is a method I just completed. Takes a dataset and imports results in to a text file. We upload the textfile to google. To help with searchers


privatebool DataSetToFile(DataSet dsUsers, string fldSep, string lineSep,
string destPathName, bool overwriteIfExist)
{
StringBuilder sb = newStringBuilder();
foreach (DataRow row in dsUsers.Tables[0].Rows)
{
string line = "";
for (int i = 0; i < row.Table.Columns.Count; i++)
{
if (line.Length > 0)
{
line = line + fldSep;
}
line = line + row[i].ToString();
}
sb.Append(line + lineSep);
}
// clean up

dsUsers =
null;
m_sqlConn.Close();
m_sqlConn =
null;

bool exists = File.Exists(destPathName);
if (overwriteIfExist == true)
{

using (StreamWriter sw = File.CreateText(destPathName))
{
sw.Write(sb);
}

}
else

{
MessageBox.Show("File Already Exist, Please Rename");
returnfalse;

}
returntrue;
}

Germ is offline  
Reply