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 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sukesh MarlaPosted Aug 19, 2012, 3:47 AM
Sukesh MarlaPosted Aug 19, 2012, 4:40 AM
sathish kumarPosted Aug 19, 2012, 4:36 AM
Thanks for ur support.....
Keep rocking...
May god bless you................
Sukesh MarlaPosted Aug 19, 2012, 4:06 AM
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 kumarPosted Aug 19, 2012, 4:04 AM
sathish kumarPosted Aug 19, 2012, 3:39 AM
Sukesh MarlaPosted Aug 19, 2012, 3:33 AM
sathish kumarPosted Aug 19, 2012, 3:32 AM
Sukesh MarlaPosted Aug 19, 2012, 3:23 AM
And in code behind you can simply use SqlPurchaseBill.Parameters.add mwthod to add parameters.
Check this is correct answer if it helped.