Stored Procedure is not Saving Records
-
hi I have made an stored procedure but it is not saving records. Can any one point out error in it.
CREATE PROCEDURE [update__FData] (@UName [nvarchar], @FName [nvarchar], @Given [bigint], @Pressed [bigint]) AS UPDATE [TypingTutorDB].[dbo].[_FData] SET [Given] = @Given, [Pressed] = @Pressed WHERE ( [UName] = @UName AND [FName] = @FName) GO
ThanksSyed Shahid Hussain
-
hi I have made an stored procedure but it is not saving records. Can any one point out error in it.
CREATE PROCEDURE [update__FData] (@UName [nvarchar], @FName [nvarchar], @Given [bigint], @Pressed [bigint]) AS UPDATE [TypingTutorDB].[dbo].[_FData] SET [Given] = @Given, [Pressed] = @Pressed WHERE ( [UName] = @UName AND [FName] = @FName) GO
ThanksSyed Shahid Hussain
-
Sometimes when I have this problem, it is because I've been sleeping when I created the procedure, and created it in the wrong database. This error usually happens late at night. Have you been sleeping? ;-) Best regards, Soeren
Bad Robot wrote:
Sometimes when I have this problem, it is because I've been sleeping when I created the procedure, and created it in the wrong database.
I think most of us have been there at one time or another. My time is usually first thing on a monday morning when I wonder why none of my tables exist in the "master" database, only to realise 5 minutes later that I forgot to switch to the correct database.
Upcoming Scottish Developers events: * UK Security Evangelists On Tour (2nd November, Edinburgh) * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog
-
hi I have made an stored procedure but it is not saving records. Can any one point out error in it.
CREATE PROCEDURE [update__FData] (@UName [nvarchar], @FName [nvarchar], @Given [bigint], @Pressed [bigint]) AS UPDATE [TypingTutorDB].[dbo].[_FData] SET [Given] = @Given, [Pressed] = @Pressed WHERE ( [UName] = @UName AND [FName] = @FName) GO
ThanksSyed Shahid Hussain
Sorry Friends, I found out the problem the problem after 2 hrs. struggle :). Problem is that datatype lengths are not specified so SQL Server associate default length that is (1). Ok Bye After all :)God Helps Those Who Help Themselves.:)
Syed Shahid Hussain
-
Bad Robot wrote:
Sometimes when I have this problem, it is because I've been sleeping when I created the procedure, and created it in the wrong database.
I think most of us have been there at one time or another. My time is usually first thing on a monday morning when I wonder why none of my tables exist in the "master" database, only to realise 5 minutes later that I forgot to switch to the correct database.
Upcoming Scottish Developers events: * UK Security Evangelists On Tour (2nd November, Edinburgh) * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog
Exactly, same here - I love to peek over people's shoulders to see if they are also doing this - and 4/10 they do it!!!
Shreekar http://shreekarishere.blogspot.com
-
hi I have made an stored procedure but it is not saving records. Can any one point out error in it.
CREATE PROCEDURE [update__FData] (@UName [nvarchar], @FName [nvarchar], @Given [bigint], @Pressed [bigint]) AS UPDATE [TypingTutorDB].[dbo].[_FData] SET [Given] = @Given, [Pressed] = @Pressed WHERE ( [UName] = @UName AND [FName] = @FName) GO
ThanksSyed Shahid Hussain