| | |
stored procedure does not delete row
Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Sep 2008
Posts: 24
Reputation:
Solved Threads: 0
Hello I use this code as a stored procedure to delete row of the table:
And this is code where I call this procedure:
It's quite strange to me, because when I execute this DeleteRowMaterialTyp stored procedure, it deletes, also when I use deletion in running application, deletion works again, i can see it on datagridview, but when I come back to the sql environment and manually make selection of the datas, I can see, that nothing has been deleted. Where is the problem? Shall I do something additional between sql database and linq class dbml?
ALTER PROCEDURE dbo.DeleteRowMaterialTyp
(
@CisloParam varchar(MAX) /* hodnota v tabulke, ktora nam identifikuje riadok, ktory sa ma zmazat */
)
AS
Delete From MaterialTyp Where Cislo = @CisloParam
RETURNAnd this is code where I call this procedure:
EtiketyLINQDataContext EtiketyData = new EtiketyLINQDataContext();
string CurrentRowCellParam = LINQdataGridView.CurrentRow.Cells[0].Value.ToString();
EtiketyData.DeleteRowMaterialTyp(CurrentRowCellParam);It's quite strange to me, because when I execute this DeleteRowMaterialTyp stored procedure, it deletes, also when I use deletion in running application, deletion works again, i can see it on datagridview, but when I come back to the sql environment and manually make selection of the datas, I can see, that nothing has been deleted. Where is the problem? Shall I do something additional between sql database and linq class dbml?
•
•
Join Date: Sep 2008
Posts: 24
Reputation:
Solved Threads: 0
aha, ok, I think that problem maybe more, that it cannot touch MaterialTyp table...hmm, but anyway, this touches the storedprocedure DeleteRowMaterialTable, which is called with this line:
so where is the solution?
because I already used messagebox to see currentrow.cell value that I need...
EtiketyLINQDataContext EtiketyData = new EtiketyLINQDataContext(); so where is the solution?
because I already used messagebox to see currentrow.cell value that I need...
•
•
Join Date: Aug 2008
Posts: 1,735
Reputation:
Solved Threads: 186
um, well the idea is to prove that the call is successfully running so the point is to use an additional table as a debug state to say
I got to this point with this value
I got to that point with this value
I didnt do that
I did this
so you can tell from the table where abouts your code failed.
I got to this point with this value
I got to that point with this value
I didnt do that
I did this
so you can tell from the table where abouts your code failed.
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
![]() |
Similar Threads
- StoredProcedure If statement not working (MS SQL)
- Deleting a Row From A DataGrid (VB.NET)
Other Threads in the C# Forum
- Previous Thread: Problems with databindings
- Next Thread: Add users to Distro List
| Thread Tools | Search this Thread |
.net access activedirectory ado.net algorithm array barchart bitmap box broadcast buttons c# chat check checkbox client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file files form format forms function gdi+ httpwebrequest image index input install java label list listbox listener listview mandelbrot math mouseclick mysql networking operator path photoshop picturebox pixelinversion post programming radians regex remote remoting richtextbox save saving serialization server sleep socket sql statistics storing stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualbasic visualstudio webbrowser windows winforms wpf xml






