NEWPKG.EXE

Overview

NEWPKG.EXE is a console mode application that can be used for viewing, creating, or removing packages from the SMS database. This code demonstrates datasource connection, folder creation, scalar manipulation, folder display, and helper functions.

Running the Program

NEWPKG.EXE runs as a console application. The program prompts you to enter the information needed to connect to SQL Server, then it creates and populates a package container. At this point the program enters a loop and prompts you to view packages, delete packages, create packages, or terminate the program. Enter:

C to create a new package folder

N to view the next package folder

P to view the previous package folder

V to view the current package folder

D to delete the current package folder

X to exit the program

Functions

SmsDataSourceConnect
SmsDataSourceDisconnect
SmsOpenContainer
SmsCloseContainer
SmsPopulate
SmsCreateFolder
SmsGetNextFolder
SmsDescribeFolder
SmsGetFolderID
SmsGetFolderType
SmsGetFolderCount
SmsLinkFolder
SmsUnlinkFolder
SmsCommitFolder
SmsCloseFolder
SmsRewind
SmsGetScalarCount
SmsSetScalar
SmsGetNextScalar

Program Flow

After logging on to a datasource, a package container is created and populated. The program then enters a loop asking whether the user wants to view the next package folder, delete the currently viewed folder, or create a new folder.