Monday, October 24, 2005
Saturday, October 8, 2005
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
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:
mscrolib.tlb should be located in your
On my XP system, I found regtlib.exe in ...windowssystem32URTTemp.
(though you may have to search your hard drive for this one).
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
- Add an installer class to your application with the following code:
Public Overrides Sub Install(ByVal stateSaver As IDictionary)
Dim Asm As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly
- Right click on your setup project and go to View - Custom Actions
- Right click on Install under Custom Actions and select Add Custom Action...
- Select the primary output of your project from the application folder
- Do the same for the Commit
That's it. Your installer will now run your application after setup.
Thursday, September 15, 2005
I figured out why I was getting the BC2010 error finally. I decided to isolate the failing build project into it's own directory and determine what the differences were between it and the Visual Studio build. As soon as I reloaded the project in VS.NET, I started getting errors that the signature was incorrect on the methods I was implementing for an interface. Upon further investigation I realized that I had renamed the dll in Nant when it was copied to my lib directory. So the interface that I was implementing referenced the DLL as one name internally, MSDocument.dll, and the library I was trying to build had a reference to it as well as MyCompanyDocumentStructures.dll. Although the contents were the same, I assume the name difference affected the signature enough that I was unable to implement it with a different name. Some sort of compiler information on the error would have been much more helpful but at least I know what was going wrong. I guess the moral of the story is to isolate the problem and then compare the vbproj file to the nant build file and figure out where you have differences. I am now looking forward to taking full advantage of Nant without vbc compiler errors.
Thursday, September 1, 2005
Here is the code from db2Commandwrapper.cs:
param.DB2Type = DB2Type.Binary;
param.Size = 16;
// convert Guid value to byte array only if not null
if ((value is DBNull) || (value == null))
param.Value = Convert.DBNull;
param.Value = ((Guid)value).ToByteArray();
Now here is the weird part, lets say I supply a GUID of value 9c1fcfe7-d68e-4a6d-b395-823bac3022f7. I run it through my stored procedure:
CREATE PROCEDURE DB2ADMIN.PROCESSORINFOADDSINGLE ( IN v_ProcessorID CHARACTER(16) FOR BIT DATA))
DYNAMIC RESULT SETS 1
-- SQL Stored Procedure
INSERT INTO DB2ADMIN.PROCESSORINFO (PROCESSORID)
and it comes out as as x'E7CF1F9C8ED66D4AB395823BAC3022F7'. The first 16 characters are somehow changed. Weird. If I run a select statement against it from CLP, it will not match. However, if I used a parameterized query that runs the same GUID back through the db2Commandwrapper conversion function, it matches. This will cause problems if I try to run a standard GetSqlStringCommandWrapper without using a parameterized value for the GUID.
I posted this same information to the Enterprise Library Newsgroups. Maybe I will get some feedback.
Thursday, August 25, 2005
Monday, August 22, 2005
Friday, August 12, 2005
Tuesday, August 2, 2005
Written by Jim Shank 8/2/05
There should be two major troubleshooting points for CCTV, the camera’s themselves and the central terminating location (CTL) in which the video signal is captured and the power is supplied (if power is not supplied mid-run or directly at the camera location). Troubleshooting will be started at the CTL and then move to each individual camera. It helps to have a baseline camera that is working in order to capture normal readings for comparison. Remember that CCTV cabling should be as follows
|RG-59/RG-6||UTP with Baluns||Fiber Optic|
< 250 ft.
250 – 3000 ft.
> 3000 ft.
- Digital Volt Meter (DVM)
- Electrical Tape
- BNC or F-type connector and small piece of coax
- 9V battery
Monday, March 28, 2005
Monday, March 7, 2005
Wednesday, February 23, 2005
Tuesday, February 15, 2005
Tuesday, February 1, 2005
Wednesday, January 19, 2005
- Download the new Emulator packagefrom Microsoft.
- Run the install
- Copy everything from C:Program FilesSmartphone 2003 Second Edition EmulatorsWWESmartphone to C:Program FilesWindows CE Toolswce420SMARTPHONE 2003Emulation
- Restart Visual Studio and check the available emulator images .
It took me forever but post me a comment if this works for you!
Thursday, January 13, 2005
- The Build Cab File button in VS.NET is not working for Smartphone development coz it's pointing to Cabwiz.exe but we have to use CabwizSP.exe instead.
- Although it's not working, we can still press the button coz it'll help us the generate BuildCab.bat and AppName_SMP.inf
- Manually change BuildCab.bat so that it points to "C:Program FilesWindows CE Toolswce420SMARTPHONE 2003Toolscabwizsp.exe".
- Manually amend the .inf file and cut away all the ARMV4 and X86 sections, and amend the shortcuts as we like.
- Run BuildCab.bat from command line, it'll generate 2 .cab files in the cabdebug directory. I just chose one of them and ftp to my server.
- On a Smartphone or Smartphone emulator, use IE to access the cab file on the web server. It'll start downloading and install the app.
- We can remove the app using the Remove Program option in the Start Menu.
Tuesday, January 11, 2005
(combine the two lines before pasting)
Friday, January 7, 2005
Images gone after moving my blog.
Wednesday, January 5, 2005
I touched on this a little bit befoe but finally figured out a solution. Here is the basic code for a Windows Service that sets up a listener thread and executes it, the listener thread is responsible for adding a handler for the queue ReceiveCompleted event. Here is said code: