Click here to Skip to main content
Sign Up to vote bad
good
ALTER proc [dbo].[sp_AmbalajGuncelle]
@ID int,
@adTR nvarchar(250),
@adEN nvarchar(250),
@aktif bit
 
as 
update Ambalajlar 
set Ambalajlar.AmbalajAdiTR = @adTR, Ambalajlar.AmbalajAdiEN = @adEN, Ambalajlar.Aktif = @aktif
where Ambalajlar.ID = @ID
 
I've added the stored procedure in my winform project via function importing. I have also other procedures which have already imported and they are working well. Only the procedure i wrote above does not affect any rows.
 
Here is my imported function provided by entity framework in C# code which also does not throw any exceptions. it seems working well at application side, but doesn't affect any rows at database as i said so.
 
cn.DBConnect.AmbalajGuncelle(Convert.ToInt32(lvAmbalajlar.Tag), txtAmbalajAdiTR.Text, txtAmbalajAdiEN.Text, chkAktif.Checked);
cn.DBConnect.SaveChanges();
 
Thanks for any help.
Posted 30 Nov '11 - 2:14

Comments
Mark Nischalke - 30 Nov '11 - 8:17
Are you sure there are rows to update? Does it work in SQL Server?
umutarge - 30 Nov '11 - 8:20
Yes, i'm sure and yes again, it works in sql server. I've tried manually with EXEC command in sql server, it worked properly.
Karthik Harve - 30 Nov '11 - 8:33
Any exceptions are coming..??
umutarge - 30 Nov '11 - 8:37
no there are no exceptions. actually, this is the annoying part. how can i know what am i supposed to do without an exception?
Laxmikant_Yadav - 30 Nov '11 - 8:44
Use sql profile to take sql trace. so u will come to know weather our sp get called or not from your application.
umutarge - 30 Nov '11 - 9:19
I noticed my mistake while tracing, it's kind of parameter issue cause of my mistake. The filter parameter always passes 0. Thank you, all of you.

1 solution

SQLProfiler tool helps to trace/debug SQL query execution. It helps for better trace.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 8,376
1 OriginalGriff 6,571
2 CPallini 3,533
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 30 Nov 2011
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid