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. Other Discussions
  3. The Weird and The Wonderful
  4. Bug of the Day (2)

Bug of the Day (2)

Scheduled Pinned Locked Moved The Weird and The Wonderful
databasehelp
5 Posts 3 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.
  • R Offline
    R Offline
    Rob Grainger
    wrote on last edited by
    #1

    I can beat that - I discovered a bug where new records were failing to be added. After a number of false trails, I homed in on the following SQL user function:

    ALTER function [dbo].[ufn_GetNextID](@IDTable as varchar(100), @IDColumn as varchar(100))
    returns integer
    as
    begin
    declare @NewID as integer
    set @NewID=0

    return @NewID
    

    end

    "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

    B R 2 Replies Last reply
    0
    • R Rob Grainger

      I can beat that - I discovered a bug where new records were failing to be added. After a number of false trails, I homed in on the following SQL user function:

      ALTER function [dbo].[ufn_GetNextID](@IDTable as varchar(100), @IDColumn as varchar(100))
      returns integer
      as
      begin
      declare @NewID as integer
      set @NewID=0

      return @NewID
      

      end

      "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

      B Offline
      B Offline
      Brisingr Aerowing
      wrote on last edited by
      #2

      :doh:

      Gryphons Are Awesome! ‮Gryphons Are Awesome!‬

      1 Reply Last reply
      0
      • R Rob Grainger

        I can beat that - I discovered a bug where new records were failing to be added. After a number of false trails, I homed in on the following SQL user function:

        ALTER function [dbo].[ufn_GetNextID](@IDTable as varchar(100), @IDColumn as varchar(100))
        returns integer
        as
        begin
        declare @NewID as integer
        set @NewID=0

        return @NewID
        

        end

        "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

        R Offline
        R Offline
        Richard C Bishop
        wrote on last edited by
        #3

        I don't see anything wrong there, what does "0" mean anyway?

        R 1 Reply Last reply
        0
        • R Richard C Bishop

          I don't see anything wrong there, what does "0" mean anyway?

          R Offline
          R Offline
          Rob Grainger
          wrote on last edited by
          #4

          richcb wrote:

          what does "0" mean anyway?

          I believe its the shape of my mouth every time I come across examples like this!

          "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

          R 1 Reply Last reply
          0
          • R Rob Grainger

            richcb wrote:

            what does "0" mean anyway?

            I believe its the shape of my mouth every time I come across examples like this!

            "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

            R Offline
            R Offline
            Richard C Bishop
            wrote on last edited by
            #5

            Nice, that had me rollin for a minute! :laugh:

            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