I should point out that the above link is using an ADODB connection, which is considered outdated, in preference to an ADO.Net connection to the database, however, the technique is the same.

Gary