Skip to content

Commit b20205e

Browse files
committed
Fixes a broken tag and spelling errors
1 parent dbf1deb commit b20205e

8 files changed

+75
-121
lines changed

_posts/2008-08-27-enterprise-library-oracletypes-and.md

Lines changed: 45 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -12,66 +12,58 @@ blogger_id: tag:blogger.com,1999:blog-36533086.post-9201356354710801780
1212
blogger_orig_url: https://www.marcusoft.net/2008/08/enterprise-library-oracletypes-and.html
1313
---
1414

15+
Things has been quite hectic since we are closing in on a sprint demo... Seems to be working now, fingers crossed.
1516

16-
Things has been quite hectic since we are closing in on a sprint
17-
demo... Seems to be working now, fingers crossed.
17+
I have done a lot of findings the last days and most of them has to do with [Oracle](http://www.oracle.com/). This has to do with me not having any experience with [Oracle](http://www.oracle.com/).
1818

19-
I have done a lot of findings the last days and most of them has to do
20-
with [Oracle](http://www.oracle.com/). This has to do with me not having
21-
any experience with [Oracle](http://www.oracle.com/).
19+
We are using [Enterprise Library 4](http://www.codeplex.com/entlib) to access the Oracle database and it's stored procedures. It internal is using the [ODP.NET client access components](http://www.oracle.com/technology/software/tech/windows/odpnet/index.html).
2220

23-
We are using [Enterprise Library 4](http://www.codeplex.com/entlib) to
24-
access the Oracle database and it's stored procedures. It internal is
25-
using the [ODP.NET client access
26-
components](http://www.oracle.com/technology/software/tech/windows/odpnet/index.html).
21+
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](http://msdn.microsoft.com/en-us/library/yk72thhd(VS.80).aspx) on my table showing me how to map between them.
2722

28-
One problem we have encountered is that the data types used by
29-
Enterprise Library is generic (DBCommand, DBTypes etc) and it is mapped
30-
to the Oracle equivalents (OracleCommand, OracleTypes). So I needed a
31-
[chart](http://msdn.microsoft.com/en-us/library/yk72thhd(VS.80).aspx) on
32-
my table showing me how to map between them.
33-
34-
But after a while I found a better way. Enterprise Library is exposing a
35-
OracleDatabase with the Oracle-flavor of the command types. By using
36-
that database I can use the same datatypes (NUMBER for example) as
37-
defined in the database.
23+
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 same data types (NUMBER for example) as defined in the database.
3824

3925
To accomplish this I did some very small but useful tricks:
4026

41-
- The OracleDatabase doesn't have a factory that takes the
42-
connectionstring-name as parameter. So I used the standard factory
43-
to get the connection-string and passed it as a parameter into the
44-
constructor of the OracleDatabase-class. Like so:
45-
New OracleDatabase(DatabaseFactory.CreateDatabase(CONNECTIONSTRING_CONFIG_GBP).ConnectionString)
46-
47-
- To get a OracleCommand rather than the standard DbCommand I created
48-
a method that simple cast into the right command:
49-
Private Function SkapaOracleSPCommand(ByVal spNamn As String) As OracleCommand
50-
Return DirectCast(m_gbpDB.GetStoredProcCommand(spNamn), OracleCommand)
51-
End Function
52-
53-
- Finally I created two methods that creates OracleParameters, one for
54-
in (with null-handling) and one for out-parameter (no value or size
55-
set):
56-
Private Function CreateOracleOutParameter(ByVal namn As String, ByVal typ As OracleType) As OracleParameter
57-
Dim parameter As New OracleParameter(namn, typ)
58-
parameter.Direction = ParameterDirection.Output
59-
Return parameter
60-
End Function
61-
Private Function CreateOracleInParameter(ByVal namn As String, ByVal typ As OracleType, ByVal varde As Object) As OracleParameter
62-
Dim parameter As New OracleParameter(namn, typ)
63-
parameter.Direction = ParameterDirection.Input
64-
parameter.Value = varde
65-
If varde Is Nothing Then
66-
parameter.IsNullable = True
67-
parameter.Value = DBNull.Value
68-
End If
69-
Return parameter
70-
End Function
27+
- The OracleDatabase doesn't have a factory that takes the connectionstring-name as parameter. So I used the standard factory to get the connection-string and passed it as a parameter into the constructor of the OracleDatabase-class. Like so:
28+
29+
```vb
30+
New OracleDatabase(DatabaseFactory.CreateDatabase(CONNECTIONSTRING_CONFIG_GBP).ConnectionString)
31+
```
32+
33+
- To get a OracleCommand rather than the standard DbCommand I created a method that simple cast into the right command:
34+
35+
```vb
36+
Private Function CreateOracleSPCommand(ByVal spName As String) As OracleCommand
37+
Return DirectCast(m_gbpDB.GetStoredProcCommand(spName), OracleCommand)
38+
End Function
39+
```
40+
41+
- Finally I created two methods that creates OracleParameters, one for in (with null-handling) and one for out-parameter (no value or size set):
42+
43+
```vb
44+
Private Function CreateOracleOutParameter(ByVal name As String, ByVal typ As OracleType) As OracleParameter
45+
Dim parameter As New OracleParameter(name, typ)
46+
parameter.Direction = ParameterDirection.Output
47+
Return parameter
48+
End Function
49+
50+
Private Function CreateOracleInParameter(ByVal name As String, ByVal typ As OracleType, ByVal varde As Object) As OracleParameter
51+
Dim parameter As New OracleParameter(name, typ)
52+
parameter.Direction = ParameterDirection.Input
53+
parameter.Value = varde
54+
If varde Is Nothing Then
55+
parameter.IsNullable = True
56+
parameter.Value = DBNull.Value
57+
End If
58+
Return parameter
59+
End Function
60+
```
7161

7262
I then use these methods to add parameters to my command:
73-
cmd.Parameters.Add(CreateOracleInParameter("IN_UPPDRAGSNR", OracleType.VarChar, uppdrag.FaktureringsUppdragsID.ToString()))
74-
cmd.Parameters.Add(CreateOracleOutParameter(paramUtNamn, OracleType.Number))
7563

76-
So that's an easy way to use Oracle-types when using Enterprise Library
77-
(4) and get around the hustle and bustle to map the two back and forth.
64+
```vb
65+
cmd.Parameters.Add(CreateOracleInParameter("IN_UPPDRAGS_NR", OracleType.VarChar, uppdrag.FaktureringsUppdragsID.ToString()))
66+
cmd.Parameters.Add(CreateOracleOutParameter(paramUtName, OracleType.Number))
67+
```
68+
69+
So that's an easy way to use Oracle-types when using Enterprise Library (4) and get around the hustle and bustle to map the two back and forth.
Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: post
3-
title: Retreat - creative silience
3+
title: Retreat - creative silence
44
date: 2008-09-01T05:21:00.002Z
55
author: Marcus Hammarberg
66
tags:
@@ -11,26 +11,12 @@ blogger_id: tag:blogger.com,1999:blog-36533086.post-1673910782798705182
1111
blogger_orig_url: https://www.marcusoft.net/2008/09/retreat-creative-silience.html
1212
---
1313

14-
I am
15-
back from a very different weekend indeed. I was given the opportunity
16-
to take part in a retreat organized by our corps (congregation). That
17-
meant that we were 15 people going away to far-off place and were silent
18-
for the main part of the weekend.
14+
I am back from a very different weekend indeed. I was given the opportunity to take part in a retreat organized 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.
1915

20-
Yes - I understand that the ones who know me have a very hard time to
21-
see me being silent for such a long time, but it all went very well.
16+
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.
2217

23-
Also the power and restfulness in being silent was so great. There are
24-
so many experiences that will stay with me for a long, long time; like
25-
eating together with 15 people in total silence - very different, or
26-
walking together with two close friends, without saying anything - it
27-
made me feel powerful.
18+
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.
2819

29-
Finally - when you are left "alone" with such much time on your hands it
30-
was very interesting to see which needs or feelings that should surface.
31-
For me, I am glad to say, I discovered that Jesus, the bible and just
32-
being in the nature was very important.
20+
Finally - when you are left "alone" with such much time on your hands it was very interesting to see which needs or feelings that should surface. For me, I am glad to say, I discovered that Jesus, the bible and just being in the nature was very important.
3321

34-
I said in the beginning that "I was given the opportunity" - which means
35-
that there must be a _giver..._ For me it's very clear that this is God
36-
giving me this - I just wanted to say Thank you!
22+
I said in the beginning that "I was given the opportunity" - which means that there must be a _giver..._ For me it's very clear that this is God giving me this - I just wanted to say Thank you!

_posts/2008-09-02-converting-class-library-project-to.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,17 @@ blogger_id: tag:blogger.com,1999:blog-36533086.post-6665008742715776220
1010
blogger_orig_url: https://www.marcusoft.net/2008/09/converting-class-library-project-to.html
1111
---
1212

13+
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...
1314

14-
We have encountered a problem when renaming and restructuring Visual
15-
Studio projects. (There are numerous problems with that but here is one
16-
that really cause us to ponder for a while.) We create a standard Class
17-
Library project and moved some unit test files into it. Of course we
18-
should have create a test project instead but now we didn't - ok...
15+
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)
1916

20-
The problem was that the unit tests didn't show up in the test view. The
21-
solution was to add the following line into the project file (ripped
22-
from a working test project)
23-
\<projecttypeguids\>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}\</projecttypeguids\>
17+
```xml
18+
<projectTypeGUIDs>
19+
{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}
20+
</projectTypeGUIDs>
21+
```
2422

25-
The GUID's are probably just my guids but the important stuff is that
26-
you'll need to add the **projecttypeguids** for your project in order to
27-
make it a test project.
23+
The GUID's are (probably) just my GUID but the important stuff is that you'll need to add the `projectTypeGUIDs` for your project in order to make it a test project.
2824

29-
\[UPDATED\]
30-
Oh yeah - you'll need to unload the projectfile and edit it manually in
31-
a texteditor. I wrote this in an hurry and missed that little tidbit of
32-
information. Sorry.
25+
**[UPDATED]**
26+
Oh yeah - you'll need to unload the project file and edit it manually in a text editor. I wrote this in an hurry and missed that little tidbit of information. Sorry.

_posts/2008-09-12-using-linq-for-first-time-for-real.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ I ran into a situation where my function received a parameter, lista, that was G
2121
LINQ to the fore! A LINQ-query could actually help us to produce the arrays we need. Here is my code:
2222

2323
```vb
24-
public sub CallStoredProc(byval lista as List(Of MyObject))
24+
public sub CallStoredProc(ByVal lista as List(Of MyObject))
2525
Dim ids = From obj in lista Select obj.ID
2626
end sub
2727
```

_posts/2008-09-13-i-was-first.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,12 @@ blogger_orig_url: https://www.marcusoft.net/2008/09/i-was-first.html
1212
---
1313

1414

15-
Tonight a new TV-shop is introduced in Sweden, [Hål i
16-
Väggen](http://www.tv6.se/halivaggen). It's a total rip-off from a
17-
really wacky Japanese TV-show.
15+
Tonight a new TV-shop is introduced in Sweden, [Hål i Väggen](http://www.tv6.se/halivaggen). It's a total rip-off from a really wacky Japanese TV-show.
1816

19-
Just to set the record straight - [I discovered it
20-
first](https://www.marcusoft.net/2007/07/only-in-japan.html)! Here is the
21-
proof - written Wednesday, July 11, 2007.
17+
Just to set the record straight - [I discovered it first](https://www.marcusoft.net/2007/07/only-in-japan.html)! Here is the proof - written Wednesday, July 11, 2007.
2218

2319
So TV6 - send the money to me. I accept checks. ;)
2420

25-
**\[UPDATED\]
26-
**Hehe - spoke to soon! The program wasn't aired until today, Sunday.
27-
Sorry about that - I was still first though...
21+
**[UPDATED]**
22+
23+
Hehe - spoke to soon! The program wasn't aired until today, Sunday. Sorry about that - I was still first though...

_posts/2008-09-26-postsharp-new-aspect-on-coding.md

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,14 @@ blogger_orig_url: https://www.marcusoft.net/2008/09/postsharp-new-aspect-on-codi
1414
---
1515

1616

17-
Yesterday I went to an lecture at [Avega](http://www.avega.se/) by [Gael
18-
Fraiteur.](http://gael.fraiteur.net/) who has built the [Aspect
19-
Oriented](http://en.wikipedia.org/wiki/Aspect-oriented_programming)
20-
framework [PostSharp](http://www.postsharp.org/).
17+
Yesterday I went to an lecture at [Avega](http://www.avega.se/) by [Gael Fraiteur.](http://gael.fraiteur.net/) who has built the [Aspect Oriented](http://en.wikipedia.org/wiki/Aspect-oriented_programming) framework [PostSharp](http://www.postsharp.org/).
2118

22-
This was right up my ally and quite frankly the AOP way of doing things
23-
is something I have strived for but never knew how.
19+
This was right up my ally and quite frankly the AOP way of doing things is something I have strived for but never knew how.
2420

2521
However the frameworks on the market all comes with an cost or buy-in.
26-
Either you'll have to use some sort of factory or context
27-
([Spring.NET](http://www.springframework.net/),
28-
[Castle](http://www.davidhayden.com/blog/dave/archive/2007/03/14/CastleWindsorAOPPolicyInjectionApplicationBlock.aspx)
29-
or
30-
[PIAB](http://www.davidhayden.com/blog/dave/archive/2007/12/12/EnterpriseLibrary4ExcitedAboutDependencyInjectionApplicationBlockWithPIAB.aspx))
31-
to create your objects or (as in the PostSharp case) it will hurt your
32-
build time.
3322

34-
But Gael also tipped us on a way of combining PostSharp with Enterprise
35-
Library
36-
([PostSharp4EntLib](http://www.codeplex.com/entlibcontrib/Wiki/View.aspx?title=PostSharp4EntLib&referringTitle=Home))
37-
to get "the best of both worlds". This seems reasonable to us since
38-
we're currently using Enterprise Library for other stuff.
23+
Either you'll have to use some sort of factory or context ([Spring.NET](http://www.springframework.net/), [Castle](http://www.davidhayden.com/blog/dave/archive/2007/03/14/CastleWindsorAOPPolicyInjectionApplicationBlock.aspx) or [PIAB](http://www.davidhayden.com/blog/dave/archive/2007/12/12/EnterpriseLibrary4ExcitedAboutDependencyInjectionApplicationBlockWithPIAB.aspx)) to create your objects or (as in the PostSharp case) it will hurt your build time.
3924

40-
I am longing to get rid of the exception handling, tracing and logging
41-
code once and for all...
25+
But Gael also tipped us on a way of combining PostSharp with Enterprise Library ([PostSharp4EntLib](http://www.codeplex.com/entlibcontrib/Wiki/View.aspx?title=PostSharp4EntLib&referringTitle=Home)) to get "the best of both worlds". This seems reasonable to us since we're currently using Enterprise Library for other stuff.
26+
27+
I am longing to get rid of the exception handling, tracing and logging code once and for all...

_posts/2008-10-09-you-have-to-manually-tell-rockbox-to.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ blogger_orig_url: https://www.marcusoft.net/2008/10/you-have-to-manually-tell-ro
1313

1414
I have just updated the operating system for my IRiver to the latest (3.0) version of [RockBox](http://www.rockbox.org/).
1515

16-
One big gottcha jumped up and bit me; you have to manually change a setting that enables RockBox to charge via USB... [Here is how its done](http://download.rockbox.org/manual/rockbox-h300/rockbox-buildch7.html#x10-1180007.6.2).
16+
One big gotcha jumped up and bit me; you have to manually change a setting that enables RockBox to charge via USB... [Here is how its done](http://download.rockbox.org/manual/rockbox-h300/rockbox-buildch7.html#x10-1180007.6.2).
1717

1818
Really annoying for me since a H320 IRiver only charges through the USB-port... Well now it's fixed.

_posts/2008-10-14-back-from-road-and-well-again.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Back from the road and well again
44
date: 2008-10-14T16:04:00.001Z
55
author: Marcus Hammarberg
66
tags:
7-
- Brass band
7+
- Brass Band
88
- Euphonium
99
- Marcus private
1010
modified_time: 2008-10-14T16:04:13.877Z

0 commit comments

Comments
 (0)