Sp_ not 'scripted' - corrupt syscomments?

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Sp_ not 'scripted' - corrupt syscomments?

    I created a new procedure in the query analzyer (sql server 8.0)

    It appeared to execute correctly on creation.

    However, upon trying to open it within the 'stored procedure' menu I get the
    following error:


    '//ERROR

    Error 0:[SQL-DMO]Object 'dbo.sp_adduser' was not scripted. It is possible
    that the information in system table 'syscomments' about the table was
    corrupt or missing

    '//ERROR FINISH

    Can anyone help me understand what is going on here.....Here is my Proc.
    code:

    Create Procedure sp_adduser
    @u_name varchar(50),
    @u_password varchar(12),
    @u_firstname varchar(50),
    @u_lastname varchar(50),
    @u_email varchar(50),
    @u_id int output
    As
    set nocount on
    if not exists(select u_id from t_user where u_name=@u_name)
    begin
    INSERT INTO t_user(u_name, u_password, u_firstname, u_lastname,
    u_email)
    VALUES (@u_name, @u_password, @u_firstname, @u_lastname, @u_email)
    select @u_id=@@identity
    end
    else
    select @u_id=-1
    return

    Many thanks
    Jason


    Guest

  2. Similar Questions and Discussions

    1. Is there any way to use a Marker placed in an FLV totrigger a scripted page turn in a Flashpaper swf?
      Is there any way to use a Marker placed in an FLV to trigger a scripted page turn in a Flashpaper swf if they are both embedded in the same page? I...
    2. Silent/Scripted configuration?
      Hi, i'm asking myself if it is possible to attach datasources (i.e. ODBC) and CFX Tags using a script. So far i couldn't find anything in the...
    3. Lingo Scripted Morpher - Now Available -
      Hi! If anyone's interested in being able to easily export morphed models as well as morph animations from 3dmax to Shockwave3d then you may want to...
    4. Export to a scripted (fieldvalue) filename?
      Hi Rienk -- you might get some idea from Ruben's answer to my post. See the Simon Lewenstein thread two posts below yours on the list. It looks...
    5. inserting a date in a scripted search
      Two possible issues to check: 1) You must use the Insert Calculated Result step, as this will not work with Set Field. 2) The EventDate field must...
  3. #2

    Default Re: Sp_ not 'scripted' - corrupt syscomments?

    [email]jason@catamaranco.com[/email] wrote:
    > I created a new procedure in the query analzyer (sql server 8.0)
    >
    > It appeared to execute correctly on creation.
    >
    > However, upon trying to open it within the 'stored procedure' menu I
    > get the following error:
    >
    >
    > '//ERROR
    >
    > Error 0:[SQL-DMO]Object 'dbo.sp_adduser' was not scripted. It is
    > possible that the information in system table 'syscomments' about the
    > table was corrupt or missing
    >
    > '//ERROR FINISH
    >
    > Can anyone help me understand what is going on here.....Here is my
    > Proc. code:
    >
    > Create Procedure sp_adduser
    Do not use the "sp_" prefix for non-system stored procedures. At best, you
    sill cause a slight performance problem since the query engine will attempt
    to run it as a system stored procedure, until it finds that it does not
    exist in the master database. At worst, you will create a procedure with the
    same name as an existing system procedure, which is what I suspect has
    happened here ... yes, a quick glance in BOL reveals this:

    -----------------------------------------------------
    sp_adduser
    Adds a security account for a new user in the current database. This
    procedure is included for backward compatibility. Use sp_grantdbaccess.

    Syntax
    sp_adduser [ @loginame = ] 'login'
    [ , [ @name_in_db = ] 'user' ]
    [ , [ @grpname = ] 'group' ]

    ------------------------------------------------------

    I suspect you will need to restore your database from a backup to undo this
    damage.

    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows [MVP] Guest

  4. #3

    Default Re: Sp_ not 'scripted' - corrupt syscomments?

    Thanks - good advice...I actually created this on a remote server so I have
    instructed my web host to advise on this...

    Many thanks for this comeback.

    - Jason
    "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
    news:utwuHUzdEHA.1604@TK2MSFTNGP11.phx.gbl...
    > [email]jason@catamaranco.com[/email] wrote:
    > > I created a new procedure in the query analzyer (sql server 8.0)
    > >
    > > It appeared to execute correctly on creation.
    > >
    > > However, upon trying to open it within the 'stored procedure' menu I
    > > get the following error:
    > >
    > >
    > > '//ERROR
    > >
    > > Error 0:[SQL-DMO]Object 'dbo.sp_adduser' was not scripted. It is
    > > possible that the information in system table 'syscomments' about the
    > > table was corrupt or missing
    > >
    > > '//ERROR FINISH
    > >
    > > Can anyone help me understand what is going on here.....Here is my
    > > Proc. code:
    > >
    > > Create Procedure sp_adduser
    >
    > Do not use the "sp_" prefix for non-system stored procedures. At best, you
    > sill cause a slight performance problem since the query engine will
    attempt
    > to run it as a system stored procedure, until it finds that it does not
    > exist in the master database. At worst, you will create a procedure with
    the
    > same name as an existing system procedure, which is what I suspect has
    > happened here ... yes, a quick glance in BOL reveals this:
    >
    > -----------------------------------------------------
    > sp_adduser
    > Adds a security account for a new user in the current database. This
    > procedure is included for backward compatibility. Use sp_grantdbaccess.
    >
    > Syntax
    > sp_adduser [ @loginame = ] 'login'
    > [ , [ @name_in_db = ] 'user' ]
    > [ , [ @grpname = ] 'group' ]
    >
    > ------------------------------------------------------
    >
    > I suspect you will need to restore your database from a backup to undo
    this
    > damage.
    >
    > Bob Barrows
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
    >

    Guest

  5. #4

    Default Re: Sp_ not 'scripted' - corrupt syscomments?

    ps: Just before you posted, I re-created with another name and it
    worked...so I will have to be careful about this in the future
    <jason@catamaranco.com> wrote in message
    news:uLG$vZzdEHA.3632@TK2MSFTNGP09.phx.gbl...
    > Thanks - good advice...I actually created this on a remote server so I
    have
    > instructed my web host to advise on this...
    >
    > Many thanks for this comeback.
    >
    > - Jason
    > "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
    > news:utwuHUzdEHA.1604@TK2MSFTNGP11.phx.gbl...
    > > [email]jason@catamaranco.com[/email] wrote:
    > > > I created a new procedure in the query analzyer (sql server 8.0)
    > > >
    > > > It appeared to execute correctly on creation.
    > > >
    > > > However, upon trying to open it within the 'stored procedure' menu I
    > > > get the following error:
    > > >
    > > >
    > > > '//ERROR
    > > >
    > > > Error 0:[SQL-DMO]Object 'dbo.sp_adduser' was not scripted. It is
    > > > possible that the information in system table 'syscomments' about the
    > > > table was corrupt or missing
    > > >
    > > > '//ERROR FINISH
    > > >
    > > > Can anyone help me understand what is going on here.....Here is my
    > > > Proc. code:
    > > >
    > > > Create Procedure sp_adduser
    > >
    > > Do not use the "sp_" prefix for non-system stored procedures. At best,
    you
    > > sill cause a slight performance problem since the query engine will
    > attempt
    > > to run it as a system stored procedure, until it finds that it does not
    > > exist in the master database. At worst, you will create a procedure with
    > the
    > > same name as an existing system procedure, which is what I suspect has
    > > happened here ... yes, a quick glance in BOL reveals this:
    > >
    > > -----------------------------------------------------
    > > sp_adduser
    > > Adds a security account for a new user in the current database. This
    > > procedure is included for backward compatibility. Use sp_grantdbaccess.
    > >
    > > Syntax
    > > sp_adduser [ @loginame = ] 'login'
    > > [ , [ @name_in_db = ] 'user' ]
    > > [ , [ @grpname = ] 'group' ]
    > >
    > > ------------------------------------------------------
    > >
    > > I suspect you will need to restore your database from a backup to undo
    > this
    > > damage.
    > >
    > > Bob Barrows
    > > --
    > > Microsoft MVP - ASP/ASP.NET
    > > Please reply to the newsgroup. This email account is my spam trap so I
    > > don't check it very often. If you must reply off-line, then remove the
    > > "NO SPAM"
    > >
    > >
    >
    >

    Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139