Delete Users
The Delete Users sample application reads the (comma-separated) phone numbers specified in a text file (a flat file) and deletes the provisioned user profile that matches each phone number from the MapPoint Location Server database.
Running the Sample in Visual Studio .NET 2003
Note You must install the Server API assemblies along with Microsoft .NET Framework v1.1 on your development computer to run this sample. For more information about requirements, see MapPoint Location Server Application Development Requirements.
To run the sample
In Microsoft Visual Studio .NET, on the File menu , point to New, and then click Project.
In the left pane of the New Project dialog box, click Visual Basic Projects or Visual C# Projects, and then click the Windows Application template.
In the Name field, change WindowsApplication1 to DeleteUsers, and then click OK.
On the Project menu, click Add Existing Item.
Navigate to the appropriate project subfolder in the Delete Users folder, select All Files in the Files of type box, and then select all the available files.
- The default location for Visual Basic .NET project files is:
Program Files\Microsoft MapPoint Location Server SDK, Version 1.0\Samples\Delete Users\vb. - The default location for Visual C# .NET project files is:
Program Files\Microsoft MapPoint Location Server SDK, Version 1.0\Samples\Delete Users\cs.
Note When prompted, replace any existing files.
- The default location for Visual Basic .NET project files is:
Delete the default windows form, Form1, from the project.
In Solution Explorer, right-click References, and then click Add Reference.
In AddReference, click Browse and add the following assemblies:
- Microsoft.MapPoint.LocationServer.Management.dll
- Microsoft.MapPoint.LocationServer.Types.dll
- Microsoft.MapPoint.LocationServer.Core.dll
Edit the SampleDeleteUser.txt file located in your project folder and enter the provisioned phone numbers that you want to delete.
On the Debug menu, click Start.
When the application is running, click Select to select the text file you modifed in step 9.
In SQL Server, type the name of the computer that hosts the MapPoint Location Server database.
In DB Name, type the name of the MapPoint Location Server database.
Click Delete Users Now! to run the application.