Testing stored procedures using Warewolf

Working with databases can be very time consuming and a bit complicated for beginners. Unfortunately this cannot be avoided – as well all know, databases are a critical part of every business.

Databases are useful for simple things like keeping track of client information right up to higher levels of complexity that keeps the business functional. There are many debates (like this one on Stack Exchange and this one from Network World) on the best way to interact with a database especially when we factor in performance, security and the overall maintenance of the database.

One commonly used way to communicate with a database is by making use of stored procedures. Stored procedures help with a variety of these things like security and reduced network traffic but especially because they increase the transaction speed between the client interface and the database. They provide a clearer way of processing and maintaining data.

We have not only simplified how we can connect to a database but developers have the ability to test stored procedures and view data directly from the database they would like access to.

Creating a New Database Source

Creating a New Database Source inside Warewolf is simple:

  • Inside the Studio, right click on a server in the Explorer and select New Database Source
  • Select the type of Server Database from a drop-down list you are working with
  • Add the Server details you would like to connect to
  • Select User or Windows Authentication Type depending where your database is linked
  • Add the database you want to use

new database source for stored procedures

If you’re working with a database over a network there is an option for Authentication type which allows for you to provide the relevant user login details. Once entered, the connection is established and the User has access to all stored procedures.

How simple is it?

Creating a new re-usable Database Service connection is easy:

  • In the Studio press Ctrl + Shift + D
  • To create a new database connector, select a Data Source from the drop-down menu
  • Select an Action from the drop-down menu
  • Click Test or access an existing Database Source by using the Data Connector tool from the toolbox. This allows for information to be passed between the Studio and database seamlessly.

The beauty of this is that once your stored procedure is selected you can instantly recognize and work with the procedure directly without having to establish a connection to test each time. Once these sources are saved they are ready to be used and re-used simply by dragging and dropping the data connection onto the work space.

testing stored procedures using data source

Conclusion

This allows for the database to be managed from within the Warewolf Studio in a clean, easy to use way. It puts an end to code redundancy and frees up more time to get back to developing. Try it for yourself by downloading the latest version of Warewolf or compiling from GitHub.

FacebookTwitterLinkedInGoogle+RedditEmail

Leave A Comment?