problem in execute the stored procedure

  • hi

    i craete a SP in my database . by this command :

    USE [MyDatabase];

    GO

    CREATE PROCEDURE test

    AS

    SET NOCOUNT ON;

    SELECT id, feed1, feed2

    FROM NFFeeds

    i can see this sp under StoredProcedure in my database .

    so...i write this command in Query :

    use [MyDatabase]

    exec dbo.test

    at this time a red underline appear under 'test' . if i set mouse cursor on it this error shows as a tag :

    "Could not find stored procedure 'test' "

    but if i execute the sp , it's execue normal and i can show the result . what this mean?

  • pooya1072 (3/16/2013)


    hi

    i craete a SP in my database . by this command :

    USE [MyDatabase];

    GO

    CREATE PROCEDURE test

    AS

    SET NOCOUNT ON;

    SELECT id, feed1, feed2

    FROM NFFeeds

    i can see this sp under StoredProcedure in my database .

    so...i write this command in Query :

    use [MyDatabase]

    exec dbo.test

    at this time a red underline appear under 'test' . if i set mouse cursor on it this error shows as a tag :

    "Could not find stored procedure 'test' "

    but if i execute the sp , it's execue normal and i can show the result . what this mean?

    I get that at work too at times. I think it has to do with some caching in SSMS, but I may be wrong. I just just ignore it and go on with my work. Obviously SQL Server can find the procedure when you actually run it. I'd start worrying if you get the red underline and SQL Server can't find it when you run it.

  • Lynn Pettis (3/16/2013)


    pooya1072 (3/16/2013)


    hi

    i craete a SP in my database . by this command :

    USE [MyDatabase];

    GO

    CREATE PROCEDURE test

    AS

    SET NOCOUNT ON;

    SELECT id, feed1, feed2

    FROM NFFeeds

    i can see this sp under StoredProcedure in my database .

    so...i write this command in Query :

    use [MyDatabase]

    exec dbo.test

    at this time a red underline appear under 'test' . if i set mouse cursor on it this error shows as a tag :

    "Could not find stored procedure 'test' "

    but if i execute the sp , it's execue normal and i can show the result . what this mean?

    I get that at work too at times. I think it has to do with some caching in SSMS, but I may be wrong. I just just ignore it and go on with my work. Obviously SQL Server can find the procedure when you actually run it. I'd start worrying if you get the red underline and SQL Server can't find it when you run it.

    so... you mean that i ignore it ? is it possible to occur a problem with this error?

  • pooya1072 (3/16/2013)


    but if i execute the sp , it's execue normal and i can show the result . what this mean?

    It means that Management Studio's local intellisense cache is out of date. Nothing more.

    Edit -> Intellisense -> Refresh Local Cache

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster (3/16/2013)


    pooya1072 (3/16/2013)


    but if i execute the sp , it's execue normal and i can show the result . what this mean?

    It means that Management Studio's local intellisense cache is out of date. Nothing more.

    Edit -> Intellisense -> Refresh Local Cache

    thanks ...

  • pooya1072 (3/17/2013)


    GilaMonster (3/16/2013)


    pooya1072 (3/16/2013)


    but if i execute the sp , it's execue normal and i can show the result . what this mean?

    It means that Management Studio's local intellisense cache is out of date. Nothing more.

    Edit -> Intellisense -> Refresh Local Cache

    thanks ...

    I habitually hit [Ctrl]+[Shift]+[R] (the hotkey combination that refreshes the Intellisense cache) after I create new objects. Those Intellisense red underlines annoy me. New objects won't show up in the Object Explorer until the cache is refreshed, either.

    Jason Wolfkill

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply