Click here to Skip to main content
15,884,177 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to Create web widgets with ASP.net ? Pin
Calin Tatar26-Feb-09 8:00
Calin Tatar26-Feb-09 8:00 
GeneralRe: How to Create web widgets with ASP.net ? Pin
Calin Tatar26-Feb-09 8:09
Calin Tatar26-Feb-09 8:09 
GeneralRe: How to Create web widgets with ASP.net ? Pin
rok_00726-Feb-09 14:36
rok_00726-Feb-09 14:36 
QuestionWhy my TreeNodePopulate of TreeView contol is not fired? Pin
kmuthuk26-Feb-09 5:28
kmuthuk26-Feb-09 5:28 
AnswerRe: Why my TreeNodePopulate of TreeView contol is not fired? Pin
Calin Tatar26-Feb-09 5:33
Calin Tatar26-Feb-09 5:33 
GeneralRe: Why my TreeNodePopulate of TreeView contol is not fired? Pin
kmuthuk26-Feb-09 6:06
kmuthuk26-Feb-09 6:06 
QuestionRPC service unavailable Pin
Armandt__26-Feb-09 5:01
Armandt__26-Feb-09 5:01 
QuestionUnable to delete row from dataset Pin
Chetan_pawar26-Feb-09 4:11
Chetan_pawar26-Feb-09 4:11 
Hello All,

I am trying to delete rows from database . For this i am using following code...
When i debug my web service it shows me row.count decrease or increase when i delete or add row in "dtimages" databale respectively.

But when i finaly update my dataset "ds" using dataadaptor then row deletion changes are not shown in DB but row addition has been successfull.

<b>Please help as soon aspossible.</b>

<code>using (SqlDataAdapter dataAdapter = new SqlDataAdapter(ol_DB.lfnGetCommandObject("Select * from property_image where property_nbr = " + Prop.property_nbr)))
{
using (SqlCommandBuilder cmdBuilder = new SqlCommandBuilder(dataAdapter))
{
DataSet ds = new DataSet();
dataAdapter.Fill(ds, "property_image");
DataTable dtImages = ds.Tables["property_image"];
int AllRowCount = dtImages.Rows.Count;
int RwCount = -1;
int cntImages = 0;
int pdfImages = 0;
foreach (DocumentPropertyProperty_image allImage in Prop.Images)
{
if (allImage != null)
{
if (allImage.Img_Org_Name != null)
{
if (System.IO.File.Exists(FeedFolder + "\\" + allImage.Img_Org_Name))
{
try
{
DataRow[] drSelected = dtImages.Select("Img_Org_Name = '" + allImage.Img_Org_Name + "'");
if (drSelected.Length &gt; 0)
{
RwCount++;
lfnUpdateImage(drSelected[0]);
if (allImage.img_file_type == 0)
cntImages++;
else
pdfImages++;
}
else
{
RwCount++;
if (allImage.img_file_type == 0)
{
lfnAddImage(Prop.property_nbr, allImage, ref dtImages, cntImages + 1);
cntImages++;
}
else
{
lfnAddImage(Prop.property_nbr, allImage, ref dtImages, pdfImages + 1);
pdfImages++;
}
}
}
catch (Exception e)
{
Remarks += e.Message + "\r\n";
}
}
}
}
}



for (int rcnt = AllRowCount-1; rcnt &gt; RwCount ; rcnt--)
{

DataRow drw = dtImages.Rows[rcnt];
//drw.Delete();
//drw.AcceptChanges();
dtImages.Rows.Remove(drw);
//dtImages.Rows.RemoveAt(rcnt);
dtImages.AcceptChanges();
}

dataAdapter.Update(ds);</code>
Questionhow to pass null values to the data type of integer? Pin
keyur satyadev26-Feb-09 2:30
keyur satyadev26-Feb-09 2:30 
AnswerRe: how to pass null values to the data type of integer? Pin
J4amieC26-Feb-09 3:04
J4amieC26-Feb-09 3:04 
AnswerRe: how to pass null values to the data type of integer? Pin
Abhishek Sur26-Feb-09 3:51
professionalAbhishek Sur26-Feb-09 3:51 
GeneralRe: how to pass null values to the data type of integer? Pin
keyur satyadev26-Feb-09 22:44
keyur satyadev26-Feb-09 22:44 
AnswerRe: how to pass null values to the data type of integer? Pin
Anurag Gandhi26-Feb-09 4:17
professionalAnurag Gandhi26-Feb-09 4:17 
AnswerRe: how to pass null values to the data type of integer? Pin
sarang_k26-Feb-09 16:40
sarang_k26-Feb-09 16:40 
QuestionRegd: Urgent Help Needed: Final year college project.... HELP Pin
ssmithraa9926-Feb-09 2:29
ssmithraa9926-Feb-09 2:29 
AnswerRe: Regd: Urgent Help Needed: Final year college project.... HELP Pin
Colin Angus Mackay26-Feb-09 5:16
Colin Angus Mackay26-Feb-09 5:16 
AnswerRe: Regd: Urgent Help Needed: Final year college project.... HELP Pin
Christian Graus26-Feb-09 8:48
protectorChristian Graus26-Feb-09 8:48 
QuestionGridview with Empty datasource Pin
Reddy198326-Feb-09 1:33
Reddy198326-Feb-09 1:33 
AnswerRe: Gridview with Empty datasource Pin
Tarini Singh26-Feb-09 2:03
Tarini Singh26-Feb-09 2:03 
AnswerRe: Gridview with Empty datasource Pin
keyur satyadev26-Feb-09 2:34
keyur satyadev26-Feb-09 2:34 
QuestionNeed to fetch the value from Dynamic Generated Text Box. Pin
Tarini Singh26-Feb-09 1:15
Tarini Singh26-Feb-09 1:15 
AnswerRe: Need to fetch the value from Dynamic Generated Text Box. Pin
Shyam K Pananghat26-Feb-09 1:23
Shyam K Pananghat26-Feb-09 1:23 
GeneralRe: Need to fetch the value from Dynamic Generated Text Box. Pin
Tarini Singh26-Feb-09 1:28
Tarini Singh26-Feb-09 1:28 
QuestionHow to detect browser in using asp.net Pin
deepak baldia26-Feb-09 1:14
deepak baldia26-Feb-09 1:14 
AnswerRe: How to detect browser in using asp.net Pin
Tarini Singh26-Feb-09 1:30
Tarini Singh26-Feb-09 1:30 

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.