Below is my source code. I used with DatakeyNames and deleted . But i want to give 2 more conditions . Based on those three conditions only i have to delete that particular row.
Below is mu source code.
Its urgent pls help me.....
CellPadding="4" ForeColor="#333333"
GridLines="None" onrowcommand="gvPO_RowCommand" EmptyDataText="No Items Added"
onrowdatabound="gvPO_RowDataBound" DataSourceID="SqlPurchaseBill"
Width="907px" Height="167px" OnRowDeleting="gvPO_RowDeleting"
ShowFooter="True">
CommandName="Delete" runat="server" OnClientClick="javascript:return confirm('Do you really want to \ndelete the item?');">
Delete
SortExpression="ITEMDESCRIPTION" />
SortExpression="BatchNo" />
HeaderText="ExpiryDate" HtmlEncode="false" SortExpression="ExpiryDate" />
SortExpression="TaxType" />
SortExpression="TaxScheme" />
Text='<%# Eval("VatPercentage")%>'>
SortExpression="VatOptions" />
ConnectionString="<%$ ConnectionStrings:CMC %>"
SelectCommand="SELECT ITEMCODE,ITEMDESCRIPTION,BatchNo,ExpiryDate,QTY,PackQTY,FreeQTY,StockQTY,TaxType,PURCHASERATE,MRP,TaxScheme,ITEMRATE,MRPRATE,DiscPer,DiscTotal,VATOn,VatPercentage,VatTotal,FreeVatAmt,MrpAbate,TotalAmount,VatOptions from [Temp_PurchaseBill] ORDER BY [ITEMDESCRIPTION]"
DeleteCommand="DELETE FROM [Temp_PurchaseBill] WHERE BatchNo=@BatchNo "
>
Above code is working . As i said earlier i want to give 3 conditions in that like below
DeleteCommand="DELETE FROM [Temp_PurchaseBill] WHERE BatchNo=@BatchNo " and ITEMDESCRIPTION=@ITEMDESCRIPTION" IPAddress=@IPAddress"
Its not working.....Help me pls
9 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Sukesh MarlaRank #461 · 5.4K reputationPosted Aug 18, 2012, 11:47 PM EDT
Sukesh MarlaRank #461 · 5.4K reputationPosted Aug 18, 2012, 11:23 PM EDT
And in code behind you can simply use SqlPurchaseBill.Parameters.add mwthod to add parameters.
Check this is correct answer if it helped.
sathish kumar115 reputationPosted Aug 18, 2012, 11:32 PM EDT
Sukesh MarlaRank #461 · 5.4K reputationPosted Aug 18, 2012, 11:33 PM EDT
sathish kumar115 reputationPosted Aug 18, 2012, 11:39 PM EDT
sathish kumar115 reputationPosted Aug 19, 2012, 12:04 AM EDT
Sukesh MarlaRank #461 · 5.4K reputationPosted Aug 19, 2012, 12:06 AM EDT
1.i cant see any file attached
2.did u gone through the sample i attached.\
Check this is correct answer if it helped.
sathish kumar115 reputationPosted Aug 19, 2012, 12:36 AM EDT
Thanks for ur support.....
Keep rocking...
May god bless you................
Sukesh MarlaRank #461 · 5.4K reputationPosted Aug 19, 2012, 12:40 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts