-
-
-
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
{
}
}">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 { } }
-
-
-
-
How to uploading and downloding the image in oracle database using asp.net
This is how I have done this in one of our projects:-1. First way is store image in BYTEARRAY while checking UPLOAD CONTROL and hold that image in CACHE. And then store it (bytearray) in Database while clicking SAVE button.2. Another way is to PUT that image on server by using UPLOAD.FileSave("PATH OF FILE") in an Binary array. The file will be saved in a folder on the server in JPG or any other form....
-
-
-
-
-
-
-
-
-
-
-
-
-
ASP.NET Interview Questions
Ans