To run this sample application, perform the following steps:
The solution file for the C# version of the sample is named eConnect_CSharp_ConsoleApplication.sln. The solution file is in the CSHARPConsoleApplication folder inside the Samples folder.
The solution file for the Visual Basic .NET versions is named eConnect_VB_ConsoleApplication.sln. The solution file is in the VBDOTNETConsoleApplication folder inside the Samples folder.
Open the Visual Studio Solution Explorer. Open the Class1.cs file in the C# project or Module1.vb file in the Visual Basic .NET project.
Locate the variable named sConnectionString and set the Data Source value to the name of your Microsoft Dynamics GP SQL Server. Set the Initial Catalog value to the name of the Microsoft Dynamics GP company database where you would like the new customer to be created.
To build the solution, choose “Start Debugging” in the Debug menu. Notice how the console window opens and closes.
The C# project creates the customer.xml file in the project’s \bin\debug folder. The Visual Basic .NET project creates the customer.xml file in the project’s \bin folder. The customer.xml file contains the eConnect XML document for the new customer.
Use the Microsoft Dynamics GP client to verify the customer was created. Search for the customer based on the eConnect XML document in the customer.xml file.