Takes you through the steps required to set up the SqlBookDemoWebApplication Visual Studio solution used in this tutorial.
Create the SqlBookDemoWebApplication solution and project
In this procedure, you create the SqlBookDemoWebApplication solution and project, which contains skeleton versions of the
files listed in the
Demonstration Solution section.
- In Visual Studio, click
.
- On the
Create a new project dialog box, scroll down the list, and select
ASP.NET Web Application, and then click
Next.
- Complete the fields as follows:
Project name
|
SqlBookDemoWebApplication
|
Location
|
c:\tutorials\SQL
|
Framework
|
Choose the appropriate .NET Framework version from the drop-down list.
Note: Must be version 4.5 or later.
|
- Check
Place solution and project in the same directory.
- Click
Create.
Add existing projects
We provide the
SqlBookWrapper and
SqlLegacyBook projects for you to add to the solution. These contain application source code and references.
- In the
Solution Explorer, right-click the solution; then select
Add > Existing Project.
- Browse to the
%PUBLIC%\Documents\Micro Focus\Visual COBOL\Samples\SQL\ado.net\SqlBookWrapper directory.
- Double-click the
SqlBookWrapper COBOL project.
- Again, in the
Solution Explorer, right-click the solution; then select
Add > Existing Project.
- Browse to the
%PUBLIC%\Documents\Micro Focus\Visual COBOL\Samples\SQL\ado.net\SqlLegacyBook directory.
- Double-click the
SqlLegacyBook COBOL project.
Add project references
The two projects you just added to the solution need to be incorporated by reference. Here you create a reference from the
SqlBookDemoWebApplication project to the
SqlBookWrapper and
SqlLegacyBook projects.
- In the
Solution Explorer, right-click the
SqlBookDemoWebApplication project; then select
Add > Reference.
- In the left pane, expand
Projects; then click
Solution.
- In the right pane, check
SqlBookWrapper and
SqlLegacyBook; then click
OK.
Declare a Data Item
- In the
Solution Explorer, open the
Default.aspx.cbl file, located in the
SqlBookDemoWebApplication project under the
Default.aspx entry.
- Declare the
my-book data item in the
working-storage section as follows:
01 my-book type SqlBookWrapper.SqlBook.
- Save and close the file.
Build the SqlBookDemoWebApplication Solution
- In the
Solution Explorer, right-click the
SqlBookDemoWebApplication solution; then select
Build Solution from the context menu.