May 15, 2012
I’ve been doing some Powershell work lately, and needed to call an Oracle stored procedure with input and output arguments. I didn’t see a good example that mimicked what I was doing, so once I figured it out, I figured it was a good idea to share it. Stored Procedure First, I created a simple stored procedure with both an input and output parameter. Powershell script Then I created a Powershell script to call the stored proc. Overall, the logic of the script is pretty straightforward. Create an Oracle connection and an Oracle Command Set the Command type to be Stored Procedure Add an input parameter, and set its type and value Add an output parameter, and set its type Open the connection Execute the stored procedure Close the connection Read the value of the output parameter Output I…
Calling Oracle Stored procedures using Powershell
May 15, 2012
I’ve been doing some Powershell work lately, and needed to call an Oracle stored procedure with input and output arguments. I didn’t see a good example that mimicked what I was doing, so once I figured it out, I figured it was a good idea to share it. Stored Procedure First, I created a simple stored procedure with both an input and output parameter. Powershell script Then I created a Powershell script to call the stored proc. Overall, the logic of the script is pretty straightforward. Create an Oracle connection and an Oracle Command Set the Command type to be Stored Procedure Add an input parameter, and set its type and value Add an output parameter, and set its type Open the connection Execute the stored procedure Close the connection Read the value of the output parameter Output I…
April 24, 2012
Have you every wanted a convention to wrap an endpoint and conditionally transfer the original chain to a different one? No server redirect here just plain old hijack your currently scheduled response with another one. This is the FubuMVC equivalent of the classic ASP Server.Transfer. Here are a couple of examples on how to do this. Scenario: Web Service API Exception Handling We have a web services application where when things go wrong we want a pretty error page for the developer type who is consuming the service. You don’t want an ugly yellow and red YSOD you have too much style for that. Answer: Wrap the Behavior Chain In FubuMVC you can easily wrap one behavior with another. This simple convention pulled from Dovetail Bootstrap wraps all of our API actions with the exception handling behavior. The generic argument…
March 12, 2012
There may be a need to extract all the ClearBasic code for entire project at once. If the project consists of only a few modules, one would use CBEX tool in interactive mode, select the modules from the list, specify the destinations, and export. But if a project involves very many modules, this method becomes burdensome - CBEX does not have a 'select all' capability. One way to make one's life easier is to use a tool developed by Dovetail Software, as explained in this article by Gary Sherman. Another method is to generate a CBEX directive file and then use CBEX in batch mode to export all the code. The process of generating the directive file is exactly what is burdensome in CBEX GUI, therefore a different method is needed. This can be achieved by using SQL statements to produce one directive…