Go to Bottom

SQL Stored Procedures for Order Manager Enterprise Edition

In this Topic: Show

Overview

The Order Manager Enterprise Edition uses several SQL scripts to obtain data for the purpose of auto-generating purchase orders that will be sent a supplier or suppliers to replenish a merchant's inventory. The scripts are located in a folder named SQL in the program installation directory, which is typically c:\StoneEdge.

These scripts become stored procedures in the Order Manager's SQL store data file as part of upgrading the Order Manager application, or the conversion of an MS Access store file to an SQL database. If the scripts are not stored successfully at that time due to runtime errors or insufficient authority, but the remainder of the program installation or conversion completes successfully, the user will need to manually install the scripts as stored procedures.

The individual performing this operation should be assigned the db_owner role on the Order Manager database, but it is imperative that the database Owner is an SQL "sysadmin" Logon ID, such as sa, rather than a domain Login ID.

How to Manually Install the SQL Server Scripts as Stored Procedures

  1. Open the SQL Server Management Studio (SSMS) software, which normally resides on a server in the Local Area Network (LAN).

Figure 1: SQL Server Management Studio - Object Explorer pane

  1. Select the Order Manager's store data file from the expanded list of databases. In this example, we will use the database called OM Data File, which is shown as selected in the figure below.

Figure 2: SQL Server Management Studio - expanded list of databases

  1. When the appropriate database has been selected, go to File>Open>File... and navigate to the location of the Order Manager's SQL scripts. The scripts will be in a sub-folder named SQL in the program installation directory, which is typically c:\StoneEdge.

Figure 3: SQL Server Management Studio - using the File menu to navigate to the location of the scripts

  1. Open one of the scripts and click the [!Execute] button to run the script.

In this example, the GetSingleUnitSKU script has been opened and executed in the database, OM Data File.

Figure 4: SQL Server Management Studio - executing the script in the selected database

 

If the outcome is successful, the response, "Command Executed", will be seen at the bottom of the screen.

Figure 5: SQL Server Management Studio - successful completion of creating the stored procedure

 

If this process is run when the scripts are already installed, an error message will be displayed instead, as shown in the figure below.

Figure 6: SQL Server Management Studio - unsuccessful completion because the stored procedure of that name already exists

 

  1. Repeat steps 3 & 4, for each of the other remaining scripts in the SQL folder.   

  2. When all of the scripts have been added as stored procedures in the selected database, exit the SSMS software by clicking the [X] in the upper right-hand corner or going to [File>Close].

 

Created: 3/18/11

Go to Top

Go to Top