SQL 2005 SMS Errors when new query renamed to existing file

Pilgram1jdPilgram1jd Posts: 7
edited April 9, 2008 9:14AM in SQL Prompt Previous Versions
Steps to produce below error:
1) open project in SQL Management Studio.
2) Create new Stored Procedure in Project
3) Past Existing stored procedure form SQL server into new file. <save file>
4) Change name to existing Visual Source safe file name.
5) click ok through all messages.
6) Save File
7) Check out file for editing.
8) Double click to show file.
9) Save file. Close window. (First Error Occurs)
10) try and open file again. (Second error occurs)
11) Close and reload project (without closing SMS) try an open file, still recieves error.

Error 1
************** Exception Text **************
System.Runtime.InteropServices.InvalidComObjectException: COM object that has been separated from its underlying RCW cannot be used.
at Microsoft.VisualStudio.TextManager.Interop.IVsTextView.RemoveCommandFilter(IOleCommandTarget pCmdTarg)
at RedGate.SQLPrompt.CommonVS.Managers.EditorManager.OnUnregisterView(IVsTextView pView)

Error 2
TITLE: Microsoft SQL Server Management Studio
Unable to open file C:\Documents and Settings\jsmith\My Documents\SQL Server Management Studio\Projects\SQL Security Scripts\SQL Security Scripts\Create Procedure uspSecU_SystemTeamType.sql.
ADDITIONAL INFORMATION:
Value does not fall within the expected range. (mscorlib)
BUTTONS:
OK


Thanks for your help.

PS. A hot-fix is listed in the Forums but no link to the hotfix is available. I do not know if the hotfix will fix this error or not.

Comments

  • Hi,

    When you say create a new stored procedure in project, do you open a query window to do it or is there some other way to do it?
    Tried following the steps you have mentioned; however I tried to create a stored proc by right clicking the project - add a new query and it all seems to be working fine.
    Am I missing something here?

    Thanks for your time.

    Regards,
    Tanya
  • tanya wrote:
    Hi,

    When you say create a new stored procedure in project, do you open a query window to do it or is there some other way to do it?
    Tried following the steps you have mentioned; however I tried to create a stored proc by right clicking the project - add a new query and it all seems to be working fine.
    Am I missing something here?

    Thanks for your time.

    Regards,
    Tanya

    Yes. You create a new Query.

    Steps to produce below error:
    1) open project in SQL Management Studio.
    2) Create new Stored Procedure in Project (New Query)
    3) Past Existing stored procedure from SQL server into new file. <save file>
    4) Change name file name in the project to an existing Visual Source safe file name.
    5) click ok through all messages.
    6) Save File
    7) Check out file for editing by right clicking on the file in the project.
    8) Double click the file in the project window to show file.
    9) Save Query Window (File). Close window. (First Error Occurs)
    10) try and open file again. (Second error occurs)
    11) Close and reload project (without closing SMS) try an open file, still recieves error.

    Thank you ,

    John Smith.
  • Hi John,

    Strange! I am not able to replicate this issue, probably it doesn't want to show it's face to me or maybe it has something to do with the version of Visual Source Safe or SQL prompt that your using? Can you let me know the version numbers of these products that you have installed on your environment please?

    Thanks,
    Tanya
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi guys,

    On certain versions of Prompt, I think the RCW error message occurs when you use RunAs to start SSMS. The error can occur when Prompt tries to save settings on the exit of SSMS. An upgrade to the latest version should fix this.
  • Hi guys,

    On certain versions of Prompt, I think the RCW error message occurs when you use RunAs to start SSMS. The error can occur when Prompt tries to save settings on the exit of SSMS. An upgrade to the latest version should fix this.

    This has nothing to do with the issue. I run as myself (not runas) and it occurs when I save a query(file) and rename it to a file that is already under source control, open the file and close it (per the steps listed above). Once the error occurs, it continues to occur until the project and SSMS is closed. It does not occur at close, but because of it, I have to close.

    Version Information:
    SourceSafe 6.0d
    SqlPrompt 3.6.0.109



    Thanks,
    John.
  • Hi guys,

    On certain versions of Prompt, I think the RCW error message occurs when you use RunAs to start SSMS. The error can occur when Prompt tries to save settings on the exit of SSMS. An upgrade to the latest version should fix this.

    According to the tool for your product. I am running the latest version and no it has not fixed it.

    John
  • Hi John,

    There was a small glitch in the fix we did for the 'Run As' issue last time that causes the bug to happen again. But we have positively fixed this issue in the latest v3.8 release that is scheduled to go live in a week or two.
    Excuse us for any inconvinience caused.

    Thanks,
    Tanya
  • Thank you Tanya,

    The way the last post read, it suggested that I was using "LoginAS" and that they were waiting on something from me.

    I really appreciate the update.

    Thank you.

    John.
  • I have run the process and here are the results:

    process:
    1) create new project (add to source safe.)
    2) script a query to clip-board.
    3) Create a new query.
    4) paste to new query window, change the name and check in to sourcesafe.
    5) remove query (perform a local delete. Do not delete from source safe).
    6) ensure that file on disk is removed/deleted.
    7) create a new query.
    8) paste in query, change the same to the same name used in step 4. Save.
    9) click through the warning messages. overwrite(yes), (continue with change)

    Errors listed below as they happen:

    TITLE: Microsoft SQL Server Management Studio


    Error HRESULT E_FAIL has been returned from a call to a COM component. (mscorlib)

    BUTTONS:

    OK

    The file does not rename, the rename process fails until the SMSS is restarted and the project gets corrupted.

    Version: SqlPrompt 3.8.0RC1

    John.
Sign In or Register to comment.