Click here to Skip to main content
15,913,361 members
Home / Discussions / C#
   

C#

 
AnswerRe: Reading a text file into a textBox Pin
xibeifeijian8-May-07 14:34
xibeifeijian8-May-07 14:34 
GeneralRe: Reading a text file into a textBox Pin
simplicitylabs8-May-07 14:55
simplicitylabs8-May-07 14:55 
GeneralRe: Reading a text file into a textBox Pin
Dave Kreskowiak8-May-07 17:33
mveDave Kreskowiak8-May-07 17:33 
GeneralRe: Reading a text file into a textBox Pin
simplicitylabs8-May-07 18:22
simplicitylabs8-May-07 18:22 
GeneralRe: Reading a text file into a textBox Pin
xibeifeijian9-May-07 3:13
xibeifeijian9-May-07 3:13 
AnswerRe: Reading a text file into a textBox Pin
Christian Graus8-May-07 18:25
protectorChristian Graus8-May-07 18:25 
GeneralRe: Reading a text file into a textBox Pin
simplicitylabs8-May-07 18:38
simplicitylabs8-May-07 18:38 
QuestionDataView Problem Pin
Michael1018-May-07 13:37
Michael1018-May-07 13:37 
I have a dataview..... When it retrieves data from the database there is a column in my data base that stores 1's and 2's. 1's mean 'Yes' and 2's mean 'No'. This column (St_Assess_Ev_Checked) has been declared as an Integer.

How do you iterate through a dataview, if it see's 1 it prints yes to my datagrid and if it see's 2 it prints no. This is my code so far.... hope I'm at least close.

DataSet sqlDS = new DataSet();
SqlDataAdapter sqlDA = new SqlDataAdapter(stReport, sqlConnection);
sqlDA.Fill(sqlDS, "progReport");
dv = sqlDS.Tables["progReport"].DefaultView;

IEnumerator iterator = dv.GetEnumerator();
foreach(DataRowView drv2 in dv)
{
for (int x = 0; x < dv.Count; x++)
{
if(dv[0]["St_Assess_Ev_Checked"].ToString() == "1")
{
dv.AllowEdit = true;
dv[0].BeginEdit();
dv[0]["St_Assess_Ev_Checked"] = "Yes";
dv[0].EndEdit();
}
else
{
Response.Write(dv[x].ToString());
}
}
}

You could of guessed the error.... Cannot convert types expected Int32!

Thanks in advance, appeciate it! Smile | :)
AnswerRe: DataView Problem Pin
SimulationofSai8-May-07 21:49
SimulationofSai8-May-07 21:49 
QuestionMDI and Childs Pin
VBDC8-May-07 12:57
VBDC8-May-07 12:57 
AnswerRe: MDI and Childs Pin
Blumen8-May-07 18:08
Blumen8-May-07 18:08 
QuestionMDI and Childs Pin
VBDC8-May-07 12:52
VBDC8-May-07 12:52 
QuestionPLEASE HELP Pin
detective_x8-May-07 12:00
detective_x8-May-07 12:00 
AnswerRe: PLEASE HELP Pin
Christian Graus8-May-07 12:08
protectorChristian Graus8-May-07 12:08 
GeneralRe: PLEASE HELP Pin
detective_x8-May-07 12:14
detective_x8-May-07 12:14 
AnswerRe: PLEASE HELP Pin
Blumen8-May-07 19:24
Blumen8-May-07 19:24 
AnswerRe: PLEASE HELP Pin
Seishin#8-May-07 21:09
Seishin#8-May-07 21:09 
Questionmultiple audio cards in c#? Pin
dirtylarry8-May-07 11:44
dirtylarry8-May-07 11:44 
AnswerRe: multiple audio cards in c#? Pin
Ed.Poore8-May-07 11:58
Ed.Poore8-May-07 11:58 
GeneralRe: multiple audio cards in c#? [modified] Pin
dirtylarry8-May-07 13:21
dirtylarry8-May-07 13:21 
GeneralRe: multiple audio cards in c#? Pin
Ed.Poore8-May-07 20:28
Ed.Poore8-May-07 20:28 
AnswerRe: multiple audio cards in c#? Pin
Leslie Sanford8-May-07 18:10
Leslie Sanford8-May-07 18:10 
QuestionBackup MYSQL Database Pin
Gopal.S8-May-07 11:01
Gopal.S8-May-07 11:01 
AnswerRe: Backup MYSQL Database Pin
Judah Gabriel Himango8-May-07 12:59
sponsorJudah Gabriel Himango8-May-07 12:59 
QuestionReflections Pin
eunderwo008-May-07 10:06
eunderwo008-May-07 10:06 

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.