Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Stored Procedure is not Saving Records

Stored Procedure is not Saving Records

Scheduled Pinned Locked Moved Database
databasehelpannouncement
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Syed Shahid Hussain
    wrote on last edited by
    #1

    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 Thanks

    Syed Shahid Hussain

    M S E 3 Replies Last reply
    0
    • S Syed 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 Thanks

      Syed Shahid Hussain

      M Offline
      M Offline
      MY1201
      wrote on last edited by
      #2

      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

      C 1 Reply Last reply
      0
      • M MY1201

        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

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        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

        S 1 Reply Last reply
        0
        • S Syed 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 Thanks

          Syed Shahid Hussain

          S Offline
          S Offline
          Syed Shahid Hussain
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • C Colin Angus Mackay

            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

            S Offline
            S Offline
            shreekar
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            • S Syed 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 Thanks

              Syed Shahid Hussain

              E Offline
              E Offline
              ednrgc
              wrote on last edited by
              #6

              The problem is your parameter data types. You have to set a length for nvarchars. ex: @UName nvarchar(50)

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups