PRB: "Save As" Does Not Save a Stored Procedure on the Server (155628)
The information in this article applies to:
- Microsoft Visual C++ 4.2
- Microsoft Visual C++ 4.2b
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q155628 SYMPTOMS
If you click Save As on the File menu in MSDEV to save a stored procedure,
the stored procedure code will be saved as a text file on disk instead of
being stored in the server database.
CAUSE
File.Save As is not intended for use in saving stored procedures to the
server.
RESOLUTION
The resolution to this problem depends on your intention:
If you are attempting to modify an existing stored procedure and save those
modifications to the server to overwrite the original stored procedure
code, then use the File.Save menu item.
If you are attempting to save the stored procedure code to a new stored
procedure on the server, then you can follow these steps:
- Insert a new stored procedure on the server by selecting the "Stored
Procedures" node in the Data View pane and right-clicking. When
prompted, specify a name for the target stored procedure that is
different from the name of any existing stored procedure.
- Copy the body of the stored procedure you want to duplicate and paste
the selection into the body of the new stored procedure.
Note: Be sure not to overwrite the name of the new stored procedure when
pasting code or you will experience the following error when you try to
save the stored procedure:
The database object <name of existing SP> already exists
- Make any additional modifications to the new stored procedure code, and
then use File.Save to save the new procedure to the server.
Modification Type: | Major | Last Reviewed: | 12/2/2003 |
---|
Keywords: | kbcode kbDatabase kbEEdition kbide kbprb KB155628 |
---|
|