Image representing the Snippets category

ADO Connection and Recordset

Published 19 years ago

This simple snippet demonstrates how to create and setup an ADO Connection to retrieve and display information from a database.

Read on ...
Image representing the Snippets category

DocTypes You Can Use in Your HTML and XHTML Pages

Published 19 years ago

The following doctypes are available for HTML 4.01, XHTML 1 and XHTML 1.1.

Read on ...
Image representing the Snippets category

How Do I Retrieve the Location of the Temp Folder for the Current User?

Published 20 years ago

When you're working with files, it is sometimes necessary to write to temporary files. Of course you could drop those files in the application's folder, but it's good practice to save those files in the user's Temp folder instead. This snippet will return the full path to the user's temp folder, e.g. C:\Documents and Settings\Imar\Local Settings\Temp\, so you know where to save your temporary files.
For this code to work, you'll need to import the System.IO namespace.

Read on ...
Image representing the Snippets category

How Do I Retrieve the Location of the Temp Folder for the Current User?

Published 20 years ago

When you're working with files, it is sometimes necessary to write to temporary files. Of course you could drop those files in the application's folder, but it's good practice to save those files in the user's Temp folder instead. This snippet will return the full path to the user's temp folder, e.g. D:\Documents and Settings\Imar\Local Settings\Temp\, so you know where to save your temporary files.
For this code to work, you'll need to import the System.IO namespace.

Read on ...
Image representing the Snippets category

Find Out Whether a Specific Column Exists in a Database Table

Published 20 years ago

This snippet will allow you to check whether a certain column exists in a database table or not. Useful when you're coding against a database which schema you don't fully know. Just change the name of the column you're looking for (nameToCheck), the Connection String and the SQL SELECT statement, the bold items in this snippet.

Read on ...
Image representing the Snippets category

Lorem ipsum dolor sit amet - Placeholder Text

Published 20 years ago

Placeholder text, use to fill in blank area's in a Web site, instead of the "content goes here" thingies.

For more information, some history and a Lorum Ipsum generator, check the Lorum Ipsum Web site.

Read on ...
Image representing the Snippets category

Display Information About a Microsoft Access Database

Published 20 years ago

The following block of code will display the properties of ALL tables in a Microsoft Access database. For the code to run successfully, the variable MyConnectionString needs to contain a valid connection string pointing to the Access database.
With this code, all tables, including system tables are displayed. If you want to limit the list, use myTable.Type to determine the type of the table and skip the system tables. User tables will return "TABLE", while system tables will return "ACCESS TABLE".

If you want to display information about just a single table, remove the For Each loop and uncomment the line that starts with Set myTable. Don't forget the pass the name of the right table to the Tables collection.

Read on ...
Image representing the Snippets category

Execute a Stored Procedure Without an Explicit ADO Command Object

Published 20 years ago

The following code shows you how to execute a Stored Procedure (called MyStoredProcedure) in ASP without creating an explicit ADO Command object. The Stored Procedure expects two parameters: @FirstParam (of datatype int) and @SecondParam (of datatype varchar). Modify the parameter list to suit your requirements

Read on ...
Image representing the Snippets category

Singleton Class

Published 20 years ago

This article is considered obsolete. Take a look here instead. This snippet shows you how to implement a Singleton class in C#.

Read on ...
Image representing the Snippets category

Measuring the Size of an Image with VB.NET

Published 20 years ago

It can be useful to be able to retrieve the Height and Width of an image file you have on disk. The following snippet shows you how to do that:

Read on ...

Mobile: False

Crawler: True

I: False