Captured Technology

Reindexing SQL Server Tables

Feb 13 2009

I had the need to reindex all the tables in a SQL Server 2005 database this week and found some very good scripts that loop through the list of user tables using a cursor and reindex each table to improve performance and reduce the size of the data file. In addition I used the dbcc command to shrink the database after the reindexing had completed. Below is the code used.

Darksma Trojan and Other Bugs

Feb 04 2009

Darksma Trojan and Other Bugs

I recently found the Darksma Trojan and other similar viruses on one of my home computers and spent a number of weeks cleaning the system. I found three tools to be very helpful in removing these difficult to delete bugs; CA Yahoo! Anti-Spy, Malwarebytes, and ComboFix.

Export and ADO Recordset to Excel

Jan 29 2009

Export and ADO Recordset to Excel

If you're in need to taking an ADO Recordset from an Access Database of a .Net Application and saving that data programmatically to an Excel file, the following procedure will do a very good job of completing the conversion.

By Steve Patterson

You can modify the SaveAs command towards the end of the function to save the file in a different location with a different name or you can add the value as a parameter to the subroutine. There is also a Visible flag near the end of the procedure which will show the Excel file after it is created. This would also be a very good value to pass into the subroutine.

Finding Good Video Content as Easy as Channel 9

Jan 22 2009


Finding Good Video Content as Easy as Channel 9

I often go to the Central Ohio .Net Developers Group at a Microsoft Office here in Central Ohio. But when I am sometimes unable to go due to schedule I try to read the presenter's blog or find similar content online as to what I would have found at the meeting. is a great resource from Microsoft with video from Microsoft presenters and Microsoft employees on all topics Microsoft.

Subtext and

Jan 14 2009


Subtext and

I was listening to DotNet Rocks show 261 Phil Haack on Subtext and Open Source about Subtext and Give the podcast a listen if you get the chance as it is worth the time in the car or on the train. Subtext is an open source CMS framework similar to DotNetNuke, Wordpress, Joomla, etc. The three frameworks just mentioned are the three that I have built sites with and is built with DotNetNuke using 95% of the default modules.

Clearing a text box in ASP.Net using Javascript

Jan 13 2009

Clearing a text box in ASP.Net using Javascript

I was looking for a way to clear a textbox on focus in an ASP.Net application today and found some Microsoft examples using scripts in the Markup language and then referencing the script using the old onfocus="SomeFunction();". But then I found the best way that works easily and keeps the code in the code behind.

Testing a SQL Server Connection on a Remote Server

Jan 02 2009

If you are establishing a web server or an application server and need to test the database connectivity from the new server back to the database server, writing a quick visual basic script that produces the feedback needed is an easy solution. Below is the code from a vbs file with the connection information left out. Just complete the connection information and run the script from the new remote server.

Inserting a Unique Identifier (GUID) into a SQL Field

Dec 30 2008
If you have a database which contains GUIDs as a column of a table, then inserting the unique identifier into the needed column is not always straight forward. I found that converting the needed value into a unique identifier makes adding it to the database error free.

Sending eMails within a .Net Application

Dec 29 2008

Sending eMails within a .Net application is fairly simple with the use of the System.Net.Mail namespace.

First, import the class:

Imports System.Net.Mail

Then create a function to provide for sending the emails within a public class:

Blog Directory

Latest technology news.
 Steve Patterson
 409  245403  3/22/2017




Blog Calendar