Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
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.

C#
cn.DBConnect.AmbalajGuncelle(Convert.ToInt32(lvAmbalajlar.Tag), txtAmbalajAdiTR.Text, txtAmbalajAdiEN.Text, chkAktif.Checked);
cn.DBConnect.SaveChanges();


Thanks for any help.
Posted
Comments
[no name] 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?
LaxmikantYadav 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.

1 solution

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

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


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900