I am getting an error as "public bool insert(DropDownList ddJnlCode, TextBox txtJnlName, TextBox txtArticleID, TextBox txtMspage, TextBox txtTable, TextBox txtImage, TextBox txtRDate, TextBox txtDDate, DropDownList ddStage, TextBox txtRemarks): not all code paths return a value"public bool insert(DropDownList ddJnlCode, TextBox txtJnlName, TextBox txtArticleID, TextBox txtMspage, TextBox txtTable, TextBox txtImage, TextBox txtRDate, TextBox txtDDate, DropDownList ddStage, TextBox txtRemarks) { try { string str; str ="insert into wip_articles(ArticleID,ProjectID,ProjectName,Mspageno,Tables,Images,Receiveddate,Duedate,Stage,Remarks) values('" + ddJnlCode.SelectedItem.Text + "','" + txtJnlName.Text + "','" + txtArticleID.Text + "','" + txtMspage.Text + "','" + txtTable.Text + "','" + txtImage.Text + "','" + txtRDate.Text + "','" + txtDDate.Text + "','" + ddStage.SelectedItem.Text + "','" + txtRemarks.Text + "')"; if(objsqlcon.Execute(str) == 1) { return true; } else { return false; } } catch { } }
-
Interview Candidate
- Apr 12th, 2006
- 2
- 1562
Showing Answers 1 - 2 of 2 Answers
Related Answered Questions
Related Open Questions
I am getting an error as "public bool insert(DropDownList ddJnlCode, TextBox txtJnlName, TextBox txtArticleID, TextBox txtMspage, TextBox txtTable, TextBox txtImage, TextBox txtRDate, TextBox txtDDate, DropDownList ddStage, TextBox txtRemarks): not all code paths return a value"public bool insert(DropDownList ddJnlCode, TextBox txtJnlName, TextBox txtArticleID, TextBox txtMspage, TextBox txtTable, TextBox txtImage, TextBox txtRDate, TextBox txtDDate, DropDownList ddStage, TextBox txtRemarks) { try { string str; str ="insert into wip_articles(ArticleID,ProjectID,ProjectName,Mspageno,Tables,Images,Receiveddate,Duedate,Stage,Remarks) values('" + ddJnlCode.SelectedItem.Text + "','" + txtJnlName.Text + "','" + txtArticleID.Text + "','" + txtMspage.Text + "','" + txtTable.Text + "','" + txtImage.Text + "','" + txtRDate.Text + "','" + txtDDate.Text + "','" + ddStage.SelectedItem.Text + "','" + txtRemarks.Text + "')"; if(objsqlcon.Execute(str) == 1) { return true; } else { return false; } } catch { } }
Related Answered Questions
Related Open Questions