CodeSnip: How to make use of parameterized cursor in Oracle

May 10, 2008 – 9:00 pm

CodeSnip: How to make use of parameterized cursor in Oracle
Often it is convenient to pass a given set of values as input parameter to a cursor. It is very useful where nested cursors are used. Parameterizing the cursor makes it more usable and avoids the limitation of hard coding values in where the clause. In this code snippet, Deepankar examines this technique with the help of the relevant SQL code. He also provides a brief analysis of the code and also a screenshot of the final output.
Deepankar Sarangi

Another way of looking at this

Jamie A comments to an article on Channel Register:

Here’s a slightly less technical way of looking at the issue:

Microsoft essentially have 2 editions of a program. The first edition speaks English (User Interface) to the user, but in behind can speak French (COM) to other components.

The second edition also speaks English and French, but can also speak Russian (VSIP - Visual Studio Integration Programme).

Microsoft intends that your components speak Russian in order to extend Visual Studio. Their VSIP license agreement also states that you can only try to speak Russian to the second edition of the software. Attempting to speak Russian to the first edition is not allowed (even if it does speak the language).

Rather than try and speak Russian, Jamie has been using French. He has asked Visual Studio if it talks a certain dialect (COM interface), and it has said “oui”. So he uses that dialect to talk to Visual Studio in order to do what he needs.

The main problem from Microsoft’s point of view is that they didn’t intend for anyone to use that dialect of French in order to talk to Visual Studio. They only expected Russian to be used. However, there’s nothing that explicitly states this. Microsoft even has public notes on the French dialect.

Therefore, Jamie thinks he’s in the right because Microsoft have not said that speaking French is forbidden. Microsoft sees it the other way. And the way things are going, it looks like the decision is going to come from a judge or jury.

There will be some French lessons in a follow up post.

Silverlight NUnit Projects

I’ve been doing some experiments to find out if it’s possible to execute NUnit on a Silverlight project. I knew that Visual Studio 2008 and Expression Blend both host Silverlight for use in the designer window. It turns out that rather than host a separate instance of the CoreCLR, the designer simply loads the Silverlight assemblies into the host runtime. This simplifies the business of creating a compatible unit testing framework considerably!

With a little bit twiddling, I’ve managed to tweak the ‘nunit.framework’ assembly so that it’s compatible with Silverlight projects. In order for your tests to execute successfully, you also need to ensure that all Silverlight assemblies (except ‘mscorlib’) are set to ‘Copy Local: True’. After this is done you can run, debug and even do code coverage on your Silverlight unit tests!

Because creating one of these projects is a fiddle to set up, I’ve created Silverlight NUnit Project template that does the work for you. To install the template simply open the ‘SilverlightNUnitProject.vsi’ file and ignore the unsigned content warning. Once installed, you will find it under the ‘Visual C# / Silverlight’ section of the ‘New Project’ dialog. You can download the template from here.

SilverlightNUnitProject 

To execute one or more unit tests you should use ‘Run Test(s)’ rather than ‘Test With > Silverlight’.

RunTests

In summary you now have 3 options when testing Silverlight projects.

  1. For unit testing you can create a Silverlight NUnit Project and use the usual TestDriven.Net commands.
  2. For integration testing (within the context of a browser) you can use the Silverlight Testing Framework.
  3. For spelunking individual methods inside the CoreCLR you can use ‘Test With > Silverlight‘.

I’d be interested to hear how you get on.

You must be logged in to post a comment.