30 June 2012

Setting up Oracle ODBC on Windows 7

Just a quick note note of the steps I took to setup a Oracle 11g ODBC connection on a Windows 7 desktop:

  • Download the appropriate Oracle Instant Client
    • Get the Basic and the ODBC zip files
  • Unzip both into the same folder (e.g. C:\OracleInstantClient\ )
  • Execute odbc_install.exe in the Instant Client Folder
  • Change your System Environment variables:
    • Add the Instant Client Folder to the path
    • Create a ORACLE_HOME and add the Instant Client Folder
  • Create a “network\admin” folder in the Instant Client folder and create your tnsnames.ora file in there, with the appropriate values.
  • You are now able to create a DSN in the ODBC manager using the Oracle driver that uses the TNS names defined in the .ora file

Hope this helps someone Smile

29 June 2012

VS2010 and Web Standards Update Pain

I recently moved to a Windows 7 64bit machine and began my install dance. When I tried to install the excellent Web Standards Update extension, it complained that it couldn't find SP1. Re-installing or removing and installing did not help.

In the Q and A pages I found a solution:

  • Using the free InstEd It! tool I modified the MSI
    •  In the Tables tab -> select the CustomAction entry -> remove the VSDCA_VsdLaunchConditions row
    • Save and install the MSI
Now I had found I could not open any css file. It seems the problem was that my Visual Studio was not installed in the OS drive. I copied the {OS drive}\Program Files\Microsoft Visual Studio 10\Common7\Packages to the corresponding folder on my installion drive, and happiness! Everything worked.

Quite the hack, but I hope it helps someone. Just don't blame me if things break :)

10 February 2011

google code mercurial

I tried to push to a clone on google code with a mercurial repo.
It asks for a username and password. And then fails the authorization when i give it my google account username and password.

You need to use the password that is generated on https://code.google.com/hosting/settings .

Thanks for making things easy google code.

27 January 2011

git svn : Path is not canonicalized

At my new job I have to use SVN, but I am a git convert. So: git svn to the rescue!
git svn clone -s https://MACHINENAME:8443/svn/PROJECTNAME/
produced the following error:
error 0: REPORT request failed on '/svn/PROJECTNAME/!svn/vcc/default': 
Path 'https://MACHINENAME:8443/svn/PROJECTNAME'is not canonicalized; 
there is a problem with the client. at C:\Program Files\Git/libexec/git-core/git-svn 
line 5114 
seems it doesn't like the capital letters??!!
git svn clone -s https://machinename:8443/svn/projectname/ 
works as expected.
Hooray!!

20 May 2010

Rhinomocks stub mulitple return values

Rhinomocks stubbing is great, but sometimes we need a stubbed instance to return different values.

[Test]
public void gggg()
{
var myobject = MockRepository.GenerateStub<IMyInterface>();
myobject.Stub(x => myobject.MyMethod()).Return("woof");
myobject.Stub(x => x.MyMethod()).Return("croak");

In this case MyMethod will always return “woof”. The “croak” will only be return if we use the .Repeat statements to tell Rhinomocks to limit the usage of the values.

[Test]
public void gggg()
{
var myobject = MockRepository.GenerateStub<IMyInterface>();
myobject.Stub(x => myobject.MyMethod()).Return("woof").Repeat.Once();
myobject.Stub(x => x.MyMethod()).Return("croak");
}
Here the first call to MyMethod will return “woof”, all subsequent calls will return “croak”.

04 May 2010

GeckoFx: Accessing the Document Elements

When using the GeckoFx version 1.9.1.0 browser control. it is important to use the correct version of the XULRunner.
When I tried to access the Document Elements with the 1.9.1.0 version of the XULRunner with this code:
geckoBrowser.Document.GetElementById("_mainTableDiv");
this is the error I encountered:
“Unable to cast COM object of type 'System.__ComObject' to interface type 
'Skybound.Gecko.nsIDOMNSElement'. This operation failed because the 
QueryInterface call on the COM component for the interface with 
IID '{F0AEF489-18C5-4DE6-99D5-58B3758B098C}' failed due to the following 
error: No such interface supported (Exception from HRESULT: 0x80004002 
(E_NOINTERFACE)).”

It was fixed by using the 1.9.1.4 version of the XULRunner.
Hope this helps someone.