Tag Archive for ASP Classic

Parameterized Queries in Access

Parameterized queries are a great asset when developing database applications. They allow you to modularize your code, so that it’s easier to read and maintain. Another great benefit of parameterized queries is that they run faster than queries which you explicity type in each time. You can use parameterized queries in both MS-SQL and MS-Access. This article discusses how to use parameterized queries in Access; if you’d like to see how to do it in SQL.

Read more

JSON character escaping function in classic ASP

If you are into advanced AJAX techniques you probably will stumble across JSON (www.json.org) which makes developing (and therefore the life) a lot easier when working with AJAX. If you already stumbled across and you use JSON within classic ASP you might find this article useful. It deals with escaping characters for JSON acording to the RFC4627#2.5
Read more

Share session state between ASP and ASP.NET apps

Learn how — and how not — to share Session variables between your old and new apps.

As you migrate your Web apps from classic ASP to ASP.NET, you may not have the luxury of completely rewriting the entire application before going to production. Instead, you may need to migrate portions of the application from ASP to ASP.NET, while leaving others as-is. If you need to make this type of migration, you will inevitably encounter the issue of how to integrate session state from your ASP application into your ASP.NET app.

Unfortunately, the session management services for each technology are completely separate, and there is no standard mechanism for sharing information between an ASP and an ASP.NET session. This article, however, shows a secure and simple method of sharing Session variables between ASP and ASP.NET pages. Along the way, you’ll also learn about several alternative methods that are not secure.
Read more

VBScript Regular Expressions: Subexpression Substitutions

Introduction
Although there are a good range of text handling functions in VBScript, there are times when the required text replacement operation would be very tricky to carry out with a combination of calls to functions such as Replace, InStr and Left. In these cases, it is worth considering the use of VBScript’s regular expressions, which are supported from VBScript version 5 upwards. An introduction to VBScript Regular Expressions is available.

Complex Substitutions

A typical use of regular expression substitutions is to process the BBCode tags into HTML. BBCode is a simplified version of HTML used by web-based applications such as the phpBB bulletin board. For example, if the user wishes to insert a hyperlink in their message then they can either use the BBCode:
Read more