Wednesday, March 28, 2012

IQ?

"How does one purport to measure a construct for which there is no consensus explanation?"

Cambridge Handbook of Intelligence, 2011

Monday, November 14, 2011

IsNot Nothing

"IsNot", which is obviously the opposite of "Is". It is especially useful when testing for when something is not "Nothing". (I love the double-negative.)

It took me a while to figure that that you can say:

If var1 IsNot Nothing Then...End If
Instead of the awkward:
If Not var1 is Nothing Then ...End If

Wednesday, September 7, 2011

Adobe Download Assistant Problems

I've run into some strange issues with downloading the Adobe photoshop CS5 trial. This is the error message I've been receiving:

Error communicating with Adobe.com (Error 100).

I tried all of the steps mentioned here with no luck: http://kb2.adobe.com/cps/898/cpsid_89867.html


The Solution that actually worked for me was a combination of the above with one important step (This is on a Windows 7 64 bit PC):



  1. Remove preferences folder from C:\Users\%username%\AppData\Adobe.comblahblaahblah Just delete this folder.

  2. Now uninstall Adobe Download Assistant from the contral panel.

  3. Login to Adobe.com and download the Download Assistant again.

  4. Install

  5. Close

  6. Go to Start ==> Programs ==> Right click on Adobe Download Assistant and RUN AS ADMINISTRATOR.

After, I started the application as an administrator I was able to search through the Download Assistant for the CS5 trial and start my download.

This all took me about 2 hours of trial and error to figure out. Hope I saved you guys some time.

Later!

Monday, February 14, 2011

VMware Virtualization Software

I just created this post to commend the awesomeness of VMware (VMs) as a virtualization solution. I now have 3 VMs setup to isolate test environments for various applications. Back in the mainframe days, this was accomplished through a series of complicated Test & Pilot systems. However, with VMs, setup is quick and there are standard wizards to assist with more complicated tasks. I was able to increase my hard drive from 10GB to 40GB without any painful MSDOS commands using the wizard.

Which brings me to the objective of this post; I have installed the latest and greatest Visual Studio 2010 and will be posting some tips and tricks for integration with the AS400 using managed providers. Coming soon….

Quick Tip: MSDOS

Sometimes we can forget how useful DOS commands can be for managing files and batch jobs. Here’s a quick tip on appending file names:

*Run the following commands in DOS. Make sure to turn the Y?N response indicator to NO!

SELECT FILE_NAME, 'copy ' + FILE_NAME + ' \\server\DATA\Files\filename2011\' + '2011_' + REPLACE(SUBSTRING(FILE_NAME, CHARINDEX('filename2011\', FILE_NAME , 0), LEN(FILE_NAME)), 'filename2011\', '') + ' /Y'

FROM dbo.FILE_NAME_TABLE

WHERE FILE_NAME LIKE '%filename2011%'


If you're feeling brave, create a regular expression to accomplish the above tasks. Fun stuff!

Use at your own risk.


SSH

Friday, September 10, 2010

Reporting in VS 2008 - Coming Soon

I will be taking a shot at client side reporting using legacy data. Meaning, producing a report on a local machine rather on a central server. Before VS 2005, Microsoft provided several choices to develop reports such as Crystal Reports from Business Objects. Then VS 2005 introduces Reporting Services at the client-side which is a serious tool to develop reports. I will try to produce a customized report from scratch for Reporting Services using the enhancements of VS 2008. I will also cutomize the pre-defined template and later try to build an psuedo ad-hoc reporting application for users.

I will post the results soon......

Monday, May 18, 2009

Remote Debugger

This little jewel ships with Visual Studio and really works. Reminds me of using an old tool called Xpeditor on the mainframe minus the obtuse commands and complicated library setup. With the remote debugger you're allowed to walk through your code, setting breakpoints if necessary on another workstation or server.

Using the remote debugger

(step by step instructions; courtesy of techrepublic.com)

Once you install all the components, you can use the remote debugger with your own applications. Follow these steps to use it with a C#/VB.NET application:

1. In Visual Studio, choose Properties on the Project menu.
2. Select Debug from the Properties page.
3. For the Start Action setting, select Start External Program and in the field type the complete path to the executable on the host computer (running the remote debugger monitor).
4. Under Start Options in the working directory box, type the directory where the executable is located.
5. Select Use Remote Machine and type the name of the remote computer in the field. You can specify any command line arguments to pass to the application on the remote computer.
6. Start the Remote Debugging Monitor on the remote computer.
7. In Visual Studio, you can begin debugging the application via the usual Debug menu by selecting Start to begin a debugging session.
When working with an ASP.NET application, be sure to reference the remote computer by name and not the IP address.

Thursday, September 25, 2008

IBM.Data.DB2.iSeries Class

Error Message: Object reference not set to an instance of an object.
or

IBM.Data.DB2.iSeries.iDB2SQLErrorException: SQL0666 Estimated query processing time 56 exceeds limit 30.



Private Sub btnUpdate1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate1.Click

Dim cn As iDB2Connection = New iDB2Connection("User ID=me;Password=me;Data Source=TESTIP;Connection Timeout = 0")

cn.Open()

Dim strQuery As String = String.Empty

strQuery = "Select * from Employee"

Dim cmd As iDB2Command = New iDB2Command(strQuery, cn)

cn.Close()

End Sub

================================================================
SOLUTION: The iDB2Command command timeout must be set to 0 (zero) to override the default of 30. If your job is estimated to run longer than 30 seconds you will receive an exception.



Private Sub btnUpdate1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate1.Click

Dim cn As iDB2Connection = New iDB2Connection("User ID=me;Password=me;Data Source=TESTIP;Connection Timeout = 0")

cn.Open()

Dim strQuery As String = String.Empty

strQuery = "Select * from Employee"

Dim cmd As iDB2Command = New iDB2Command(strQuery, cn)

cmd.CommandTimeout = 0

cn.Close() End Sub



TIP:

Add a Try, Catch Statement to find exception details. By using Try and Catch blocks, you separate error-handling statements from your logic. The ensures easier debugging.



If my blunders have helped you at all, please feel free to feed my ego and leave me a message.