Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
ALTER proc [dbo].[sp_AmbalajGuncelle]
@ID int,
@adTR nvarchar(250),
@adEN nvarchar(250),
@aktif bit
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);
Thanks for any help.
Posted 30-Nov-11 3:14am
Mark Nischalke at 30-Nov-11 8:17am
Are you sure there are rows to update? Does it work in SQL Server?
umutarge at 30-Nov-11 8:20am
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 at 30-Nov-11 8:33am
Any exceptions are coming..??
umutarge at 30-Nov-11 8:37am
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 at 30-Nov-11 8:44am
Use sql profile to take sql trace. so u will come to know weather our sp get called or not from your application.
umutarge at 30-Nov-11 9:19am
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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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

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

  Print Answers RSS
0 CHill60 205
1 Sergey Alexandrovich Kryukov 175
2 Zoltán Zörgő 175
3 Richard MacCutchan 175
4 Richard Deeming 170
0 Sergey Alexandrovich Kryukov 9,328
1 OriginalGriff 6,806
2 Peter Leow 4,442
3 Zoltán Zörgő 3,984
4 Richard MacCutchan 2,807

Advertise | Privacy | Mobile
Web01 | 2.8.150129.1 | Last Updated 30 Nov 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100