Tutorial exercise 1: Creating a simple user-defined routine
This exercise demonstrates how to use the tools of the -- BladeSmith and the DBDK Visual C++ Add-In--to create a DataBlade® module with a user-defined routine and to debug it.
About this task
The AddInts DataBlade® module has one function, AddIntegers(), which adds two integers and returns the result.
You follow these basic steps to create the AddInts DataBlade® module:
Procedure
- Use BladeSmith to create the AddInts DataBlade® module project.
- Use BladeSmith to create the AddIntegers() function.
- Use BladeSmith to generate the DataBlade® module code.
- Create a test database.
- Add code for the AddInts() function to the code generated by BladeSmith.
- Compile and install your source code by using Microsoft™ Visual C++.
- Set a breakpoint for the AddInts() function.
- Edit the AddInts.sql unit test file.
- Click the Debug DataBlade® Module button on the add-in toolbar to start debugging