Category: Programming

How to Dynamically Set the Report RecordSource in Microsoft Access

One of the steps for creating a report in Microsoft Access is to define where the data is coming from.  This is done through the report’s Record Source property which can be a table or standalone query in the database or a SQL statement as shown in the screenshot below....

Custom User Controls and Events in C#

One of the interesting features of C# is the ability to add custom user controls to your forms. If you have some specific functionality centered around a group of form controls that you use repeatedly, you can save it as a custom control in a class library and then...

Using JavaScript with ASP.NET

Why Use JavaScript? There are a few technologies that you must be comfortable with if you want to do any serious web development. HTML for content, CSS for formatting and JavaScript for dynamic programming are recognized as the three foundation skills that any good web designer needs. ASP.NET programmers...

My Virtual Vacation and Free Stuff

Summer vacation has mercifully arrived for me and my students.  Unlike many teachers, I’m at the school through most of the Summer.  My students get three weeks off – I get one week followed by a couple weeks of what will essentially be teacher workdays.  Judging from the sympathetic...

How to Convert Between Roman and Arabic Numerals in C#

The Challenge My latest challenge to my database programming students was to create a C# class that would perform various number conversions, starting with Arabic numbers (0 to 3999) to Roman numerals and vice versa. I required that all public functions in the class needed to be declared as...

How to Create Lookup Fields in C#

I started my (more or less) serious database development training many years ago in Microsoft Access.  One of my favorite controls was the Combo Box, a nice little drop-down field that enabled the user to select one of many values but collapsed down onto a single line.  The Combo...

How to Retrieve Data from SQL Server into C#

The .NET framework has a few different automated methods for managing connections to SQL Server and other databases. The framework has been around since 2003 and various versions have introduced new, improved data management tools while maintaining the old ones for backward compatibility. It’s still possible, however to retrieve...

How to Convert Between Decimal and Binary in T-SQL

For the past six months, I’ve been teaching night classes in database programming and my students are just about ready to take Microsoft’s 98-364 exam. Now, we’re transitioning over to C# programming for the next phase of the program but I have to keep their SQL skills fresh for the...

Primes in the Key of C#

Yes, prime numbers are a go-to challenge for me that I’ve been casually playing with since my earliest programming days. I’m not alone; prime numbers are important and popular enough that there’s an entire distributed computing project dedicated to finding the highest Mersenne Prime number (primes such as 31...

My First Steps with Python – Prime Numbers

I recently started studying the Python programming language. I’m getting ready for a new programming-related position next year and one of my colleagues suggested using Python as part of it. I’ve heard of Python more and more over the past several years and I figured now would be as...