How to pass and receive associative arrays with ODP.NET

“How to pass and receive associative arrays with ODP.NET” - that question is sure to have to annoyed a lot of programmers. We have really pulled our hair over this problem and when you search for it on the net there is not very much helpful to be found. We are using a feature of the ODP.NET that allows you to send arrays of parameters to and from stored procedures in Oracle. This is called associative arrays and is described in great detail in this article. BUT… of course there is a but. This article doesn’t describe how to receive arrays back from a stored procedure. This is described here. The trick (and confusing part) is that the size of the output array needs to be specified a priori (on beforehand) even for output parameters. A bit strange but it works.
Read More

Sleepless in Stockholm

Since I took a way too long nap together with Abbe earlier this evening I am now paying the price and can’t sleep. This happens about once every fifth year or so, so why not take the opportunity to do something useful. So now I have done that (a powerpoint-presentation for work that never seems top my priority and sending emails surrounding Christmas(!) concerts) I thought I’ll upload some new pictures on Abbe. Good night reader… where ever you are
Read More

More on Enterprise Library (EntLib), ODP.NET and type mapping

The last time I wrote about this I was a bit too fast to get all the intricate details down. One of those details blew up in my face today. The main reason for why it took me the better part of the afternoon to sort out had to do with some really confusing name-setting. Here is was confused me; the namespace System.Data.Oracle Microsoft has provided a implementation of a Oracle client provider. Keyword: Microsoft -this implementation doesn’t contain all the functionality in Oracle databases. cause of that Oracle has given us the Oracle.DataAccess.Client or ODP.NET for short. In this you’ll have all the things you’ll need. Both of these inherits from the generic DbCommand (and uses the same name for almost everything) and can hence be converted into DbCommand but not into each other (of course - but this took me about 1,5 hours to grasp, since the both...
Read More

Converting Class library project to MS Test project

We have encountered a problem when renaming and restructuring Visual Studio projects. (There are numerous problems with that but here is one that really cause us to ponder for a while.) We create a standard Class Library project and moved some unit test files into it. Of course we should have create a test project instead but now we didn’t - ok… The problem was that the unit tests didn’t show up in the test view. The solution was to add the following line into the project file (ripped from a working test project) <projecttypeguids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</projecttypeguids> The GUID’s are probably just my guids but the important stuff is that you’ll need to add the projecttypeguids for your project in order to make it a test project. [UPDATED] Oh yeah - you’ll need to unload the projectfile and edit it manually in a texteditor. I wrote this in an hurry and missed...
Read More

Retreat - creative silience

I am back from a very different weekend indeed. I was given the opportunity to take part in a retreat organised by our corps (congregation). That meant that we were 15 people going away to far-off place and were silent for the main part of the weekend. Yes - i understand that the ones who know me have a very hard time to see me being silent for such a long time, but it all went very well. Also the power and restfulness in being silent was so great. There are so many experiences that will stay with me for a long, long time; like eating together with 15 people in total silence - very different, or walking together with two close friends, without saying anything - it made me feel powerful. Finally - when you are left “alone” with such much time on your hands it was very interesting...
Read More

Run Explorer as another account

Here is a thing that is really annoying, and the solution. When you’re not allowed administrative rights on your computer with your standard account you often need to run certain programs under another account. This works fine, with a simple right click and choosing Run As… (even for MSI-files). But for some reason the Explorer.exe cannot be started this way. This is how to make it work: Create a .bat-file on your desktop (or where you want it) Enter the following line into it: runas /user:[your domain][your account] “C:\Program Files\Internet Explorer\iexplore.exe” Save the bat-file Double-click the bat-file and provide the password for your account when asked This will start Internet Explorer. Enter C:\ as the URL
Read More

Enterprise Library, OracleTypes and their mapping

Things has been quite hectic since we are closing in on a sprint demo… Seems to be working now, fingers crossed. I have done a lot of findings the last days and most of them has to do with Oracle. This has to do with me not having any experience with Oracle. We are using Enterprise Library 4 to access the Oracle database and it’s stored procedures. It internal is using the ODP.NET client access components. One problem we have encountered is that the data types used by Enterprise Library is generic (DBCommand, DBTypes etc) and it is mapped to the Oracle equivalents (OracleCommand, OracleTypes). So I needed a chart on my table showing me how to map between them. But after a while I found a better way. Enterprise Library is exposing a OracleDatabase with the Oracle-flavor of the command types. By using that database I can use the...
Read More

Result of modelling

I’ll keep it short - sprint demo coming up… The result of my modelling efforts in the early summer is now published. It part of the economical presentation of Avega. You can find it here - and find me on page 13.
Read More

Connectionstring.com - great resource

I just found this great site http://www.connectionstrings.com. Here you’ll find the answer to the age-old questions on how to write the connection string for (almost) every database provider. Some people has know about this for a long, long time but haven’t told me about it… But I am not like that - here you go.
Read More

In control III - trombonists

This is not for the faint hearted, but well worth seeing. Its a clip from a recording session of the film music to the movie Hellboy. And the sounds these dudes produces are just … well scary. For any non-brass players I can tell you that to produce one of those “bursts” is hard. Really hard. To do 15 or so in a row is just amazing. And now for something completely different. The best trombone player (not counting the bass trombone dudes above) in my opinion is Håkan Björkman. Here is a clip of him doing a cadenza of the Leopold Mozart’s Alto-trombone concerto. Very different - but still amazing. Yeah - this is also something that shouldn’t be possible to accomplish. I have heared it live at the Stockholm Opera once.
Read More