Click here to Skip to main content
13,191,400 members (83,854 online)
Rate this:
Please Sign up or sign in to vote.
See more: , +
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 2:14am
Mark Nischalke 30-Nov-11 8:17am
Are you sure there are rows to update? Does it work in SQL Server?
umutarge 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 30-Nov-11 8:33am
Any exceptions are coming..??
umutarge 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 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 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
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171017.1 | Last Updated 30 Nov 2011
Copyright © CodeProject, 1999-2017
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