Monday, October 24, 2005

Guided Setup via Broadband for TiVo Series 2

Apparently, there isn't an intuitive way to use your broadband connection to do the initial setup on the Series 2 TiVo's. I just confirmed that changing the dialing prefix to ,#401 will let you do it. TiVo's FAQ says that I am wrong, but who can argue with completed setup. Make sure to use one of their supported adapters.

Saturday, October 8, 2005

Mysterious DB2 8.2 UDB FixPak 10 Issue: Solved

I recently added native support for DB2 8.2 UDB from our product and was doing quite well until I went out for deployment. Many odd errors were occurring throughout the product with the DB2 error: "ERROR [22005] [IBM][CLI Driver] CLI0112E Error in assignment. SQLSTATE=22005 " I couldn't understand how it had worked perfectly in development but failed in deployment. We finally tracked the difference down to the fixpak. I was developing under FP9a and deploying under FixPak 10.

I copied my NUnit testing code over to deployment and ran it and about 1/3 of all of my functions were failing. After several days of troubleshooting I finally tracked it down to the way the DB2 client handles Enums. I was passing the enums directly as stored procedure parameters with no sort of conversion into an Int32 field. After changing the code to do a Ctype(myEnum, Integer), the code is working flawlessly again. Stupid on my part to not convert them directly but Option Strict didn't catch them in the Enterprise Library AddInParameter method. Also very strange that the behavior changed between clients. In the development environment, we were able to verify that even if the database remained on FP9 and the client changed to FP10, the error would occur. So this is a 100% client problem. I don't have a clue how to let IBM know about this but hopefully it will get to them from one of their direct customers. Until then, remember to explicitly convert your datatypes!

Friday, October 7, 2005

VS.NET Macros Stop Working

Curiosity killed the IDE.
In the last few months I have been experimenting with a host of Visual Studio .NET add-ins. Sometime in there, my Macro environment stopped working. I would run a macro and the task tray icon would flash and then nothing would happen. At some point, I finally coerced an error message of "No such interface supported" out of my Macro IDE but that lead me no where on a Google search. I tried uninstalling all of my current add-ins which was no easy task. Unfortunately, none of the uninstalls remedied the problem. Finally, I decided I would take the big plunge and do a repair on Visual Studio.NET 2003 EA. For those of you who haven't experience this, it takes about 2-3 hours.

I couldn't believe it when I went confidently back in and the macro's still didn't work. I finally found a reference that looked promising on Matt Renolds .NET 24/7 explaining that poorly behaved add-ins can unregister mscorlib.tlb. The fix posted was to do the following:
REGTLIB.EXE MSCORLIB.TLB

mscrolib.tlb should be located in your
...windowsMicrosoft.NETFrameworkv1.1.4322 directory.
On my XP system, I found regtlib.exe in ...windowssystem32URTTemp.
(though you may have to search your hard drive for this one).

Sincerely,
Ed Dore [MSFT]

I tried that and got a "mscorlib.dll failed : 80029c4a" error. The last part of that thread said to try uninstalling and reinstalling the .NET Framework. I didn't believe it but after a quick uninstall/reinstall/reboot/patch, my macros are back. I hope someone finds this and doesn't have to go through all of that again.

Wednesday, October 5, 2005

Start Application Automatically After Setup

I wanted to automatically run my application after setup completed. I searched high and low for this option and it just isn't included in the Setup Project options for Visual Studio.NET 2003. It looks like it will be in 2005 though. Here is the easy way to do it

  1. Add an installer class to your application with the following code:
    [sourcecode language='vb']
    Public Overrides Sub Install(ByVal stateSaver As IDictionary)
    MyBase.Install(stateSaver)
    Dim Asm As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly
    System.Diagnostics.Process.Start(Asm.Location)
    End Sub
    [/sourcecode]

  2. Right click on your setup project and go to View - Custom Actions

  3. Right click on Install under Custom Actions and select Add Custom Action...

  4. Select the primary output of your project from the application folder

  5. Do the same for the Commit


That's it. Your installer will now run your application after setup.