Dynamically Selecting a Value in a C# DropdownList Control

Thursday, October 10th, 2013

In a recent internal C# web project, I needed to accept a URL parameter and use that value to select an item value, if it exists, within a DropDownList control. I have provided the code, along with some commentary, to use as a refresher for myself and a base for others. This code was implemented […]

Converting SQL DateTime to a Simple Date

Friday, April 29th, 2011

Just to remind myself at a later date, this is a SQL Query that shows how to strip the timestamp from a datetime value. Declare @fulldate datetime Set @fulldate = getdate() Declare @shortdate smalldatetime Set @shortdate = convert(datetime,convert(char(10),getdate(),101)) Select @fulldate, @shortdate

Creating an Excel document from MS Word

Thursday, July 8th, 2010

I have just come across the need to create an Excel workbook from a MS Word macro. I have simplified this code for the blog to simply move all text from Word into a new Excel workbook. This will provide a solid starting point for future use. Option Explicit Public Sub FormatInExcel() On Error GoTo […]

Updating ActiveX Datagrids in QTP

Friday, July 11th, 2008

In my recent testing efforts, I have comes across a desktop windows form (written in VB6) involving updating a data grid and then calculating another field’s value based on those updates. In order to achieve this functionality, the development staffs implemented two events (AfterColUpdate and LostFocus) that, when triggered, would fire off the calculation method. […]

Using QTP to Connect to an Oracle Database with Instant Client

Thursday, June 26th, 2008

Need a light-weight ODBC connection to an Oracle database for you QTP scripts? Oracle Instant Client is just the ticket, assuming you have Oracle version 10g for your database. Please read the information provided by Oracle to make sure Instant Client is right for your needs.

Accessing Methods of ActiveX Objects

Wednesday, May 28th, 2008

I have been using QuickTest Pro for several years now and have just discovered a simple, but highly useful, feature. In dealing with ActiveX controls, there are many times when the ActiveX add-in for QTP just doesn’t full recognize an application object. Using the ObjectSpy, you can select the object in question and see all […]

Description Objects

Friday, May 9th, 2008

When creating reusable actions in QuickTest Pro, there are times you may come across the need to dynamically access an object within your application that may or may not exist within your Object Repository. One approach to handling this opportunity is through the use of Description Objects. I could spend a lot of time attempting […]

QuickTest Pro – List of mic* Keywords

Thursday, May 8th, 2008

Here is a list of mic* keywords that can be used in QuickTest Pro. I do not have documentation for each of the keywords. I have posted these has a quick reference guide for myself, and others. These codes will be useful when entering text into textboxes, manipulating datagrids, selecting items for comboboxes and listboxes. […]