Wednesday, February 23, 2005

Solving the dreaded Oracle Invalid Parameter Binding

It only took me 2 weeks to finally fix this one. I am using the ODP.NET driver to access my Oracle database from VB.NET. It seemed like every time I tried a dataAdapter.Update command, it would bomb out with an ArgumentException error with a message of Invalid Parameter Bindings (thanks Oracle). The first week was spent searching and trying to implement a SQL Trace (like SQL Profiler for MSSQL) so I could see what exactly the OracleCommandBuilder was sending off for the command. No luck there, I can't believe how outdated Oracle GUI management tools are. I would have thought at some point they would have written at least some sort of simple GUI management tool but alas, a Web version of iSQL plus and Enterprise Manager are all that is available to us who crave an easier way to manage.

Tuesday, February 15, 2005

StringBuilder.ToString with Null Characters (0x00)

A little interesting find in todays coding. I am parsing a binary file type and when I encounter values that I don't want to convert, I was setting them to 0 (ASCII Null). These values were then added to a StringBuilder object successfully. The interesting thing is when I finish the operation and return a StringBuilder.ToString, the text is truncated at the Null character position even though there is additional text beyond it. I was unable to find a quick and easy way to erase the text I didn't want to see in the ouput so I ended up changing the offending characters to 32 (ASCII Space). I found an article on Expert Exchange (great site) about a similar problem but didn't find a specific solution doing it the way I am. Technically, I could create another array and populate it and then return the new array but it seems less efficient then just setting the values to 0 and letting a conversion remove them. I guess this was the intended method of .NET (NUL signals the end of the string). Feedback is welcome on this :)

Tuesday, February 1, 2005

Still waiting on my $52 512MB MiniSD Card

Would you believe I still haven't received it?!?! It's been over a month now and nothing. I guess I will have to call again and see when it is back ordered to this time.

Bluetooth Headset

It arrived! I got the free bluetooth headset on Friday! I was suprised to open a box from Youth America and find a Motorola HS-810 headset in the box. I figured there was no way I was one of the first 1000 users of the MPX-220 to register but here it is. The size and shape are really well done and I prefer the flip out boom mic as compared to the 820. My brother says his 820 likes to redial in his pocket. I am disappointed with the interface to the MPX220 though. Voice dial doesn't work quite correctly due to a problem with the bluetooth stack in Microsoft Windows Mobile 2003. It is rumored to be fixed sometime but I won't hold my breath. You can actually hold up the volume button on the phone to activate Voice Dial and then speak into the headset but you get no prompts on the headset which is difficult. I can't use it as a wireless audio device either. It would be nice to play games/listen to MP3s using it. As a hands free headset for phone calls, It works pretty well. It has a world more of possiblities but I guess I will have to wait for Windows Mobile 2005 to see what it can do. It is definitely worth what I paid for it.

Oracle Time

Sorry it's been so long since an update. I have been working and coding hard. I was presented with the challenge of adding native ODP.NET (Oracle Data Provider) support to my current project. For those who are looking to get a start on Oracle here is what I did.