This category contains a FAQ about ASP and databases.
This category is all about APS and error handling.
Looking for an FAQ about extensions for ASP? Then check out this category.
If you have any questions about ASP and e-mail please read this FAQ.

Explore the FAQs

Send Mail

Send Mail with Dreamweaver MX

Question:


How can I send mail with Dreamweaver MX. I want to send out a simple subscription confirmation. Read More
Databases

Allow Zero Length and SQL create / alter table

Question:

With a 'create table' or an 'alter table' SQL statement I can add tables or columns to my online live Access database.
I can set new columns to non-required using 'null' in the SQL statement, but is there a way to set the 'Allow Zero Length' property to 'yes' as well?

Read More
Databases

database adding #.......# to your files?

Question:


When i linked my images to my Access database, i keet getting a #.............# aroung it?
example: database has ""/myimages/picture.jpg""
I was getting this on the picture  "http://www.mysite.com/myimages/picture.jpg#http://picture.jpg#"

How can i fix it?

Read More
Databases

Controlling your dates

Question:

How do I make my date in a hidden form element so that it inserts properly in a UK timezone date field ? Read More
ASP

Display Record Count

How do I display the record count on my search results pages, e.g. Records 1-25 of 56? Read More
ASP

Delete Dynamically Named Folder

Question:


How can I delete a dynamically named folder with the record it belongs to? 
I created a member site that uses Pure ASP Upload to create a dynamically named folder for each member's images when they first upload. Sometimes we need to delete a member and want to delete the folder as well. Not all members upload images so not all members have folders. How can I delete the folders with the deleted record and insure the page doesn't crash when there is no folder? Read More
ASP

How do I reset the Autonumber to Zero in MSSQL

Question:


You have designed your database and populated it with test data and it is all working fine. It is time to go live and you delete the test data and are ready to go live.

You go live and when you see the live data going into your database the live auto number (@@IDENTITY) starts at the end of the last test number.

No Panic... just use the following in Query Analyzer

Read More
ASP

How do I handle BLOB fields in the Recordset

Question:


When dealing with BLOB fields from Microsoft SQL Server, you must put them to the right of non-BLOB columns in the resultset. To be safe, you should also read the columns in left-to-right order, so if you have two BLOB columns as the last two columns in your resultset, read the first one and then the second. Do not read them in the reverse order. Read More
Error Handling

Using the File System Object on IIS with Norton Antivirus Running

When using the FSO, my ASP page tends to "hang", but doesn't report any errors.

For instance if you use the Pure ASP upload Pack by George Petrov

Read More
Databases

Is there an easy way to create a DSN-less connection to a database?

Steps to Create a DSN-Less Connection String for your Access and SQL Server database(s) using some nice windows features.

Read More
ASP

How many results at one page?

This FAQ explains how you can have your visitors decide how many records they want to be displayed in a repeat region (for example after a search performed on your site).

Read More
Error Handling

Retrieve form fields for debugging

Q

How can i view the contents of a submitted form?

A

Create an ASP page with the following code, and set your form's ACTION
attribute to point to this page.


<% Option Explicit %>
<html>
<!-- head tag -->
<body>

<%
dim fld

response.write "Result from: " & request.serverVariables("HTTP_REFERER")
response.write "<table>"
response.write "<tr><td>Field</td><td>Value</td></tr>"
for each fld in request.form
response.write "<tr><td>" & fld & "</td><td>" & request.form(fld) & "</td></tr>"
next 'fld
response.write "</table>"

%>

</body>
</html>

 

source: ASPToday

Read More
ASP

Formating Date/Time values for different National Preferences

Q

Where can i find a Reference for Formatting Date/Time values for different National Preferences ?

A

http://www.tdsf.co.uk/tdsfdemo/LocaleIDs.asp

Read More
ASP

Write the EURO character

Q:

How can i write the EURO character to the browser ?

A:

Use the code below:

<%
Response.Write "&#8364;"
%>

 

source: ASPToday

Read More
ASP

Number Count Beside Each Record

This FAQ will demonstrate how to display the number count beside each record when listing your records while using the Repeat Region behavior. Read More
Error Handling

IE ASP Error Handling

I am getting those nasty error500 pages when my ASP code isn't correct and can't see any information on the error that it produces ?

Read More
Databases

Retrieve Form Values from UD4 Insert Record behavior

If you are using the ASP server model and asked yourself once, how do I retrieve the form values from the form that is associated with the UD4 Insert Record Behavior? Read this FAQ. Read More
Databases

Filtering a Recordset with another on same page

How to filter one recordset with another on the same page? Here is a quick tutorial.

Read More
Extensions

PD Editor font size 1 doesn't work

When using the PD editor it appears that font size 1 doesn't work and neither does the add hyperlink button Read More
ASP

Invalid Class String

Are you getting the error below?

Server objecterror 'ASP 0177 : 800401f3'

Server.CreateObject Failed

Invalid class string

Read More
Databases

Keeping User paragraphs (VBS)

Are you making a Content Management System?
Are you making a Forum?

Then I'm sure that you are about to ask:

How do I display the Text as the user entered it? because it shows on the browser as one big block of text...

Read More
Extensions

Why do my extensions disappear when I customize the code?

I'm sure that it's happed to everyone, an extension does Almost what you need it to.  So you, being the crazy code warrior that you are, breaks open the code view, and adds that extra if statement to the code... so you test it, and it works.  You are the king, until you have to edit a property of the server behavior, boom, it's gone from the list...

what ever shall you do!!!

Read More
Extensions

Before you upload....

Test... Test.. Test.. Test.. Test.. Test
and when you're done doing that, send it to someone else to test it.
Read More
Databases

Images from a database

I want to pull images out my database so they will be shown in the webpage dynamically. Is this possible with Ultradev because I can't get it to work? Read More
Databases

OLE DB white paper

Universal Data Access through OLE DB

Universal Data Access Through OLE DB provides a comprehensive introduction to OLE DB as an enterprise development tool.
This white paper is being made available for your review only; it is not supported by Microsoft.

Also read: Switching from ODBC to OLE DB:

http://www.udzone.com/showDetail.asp?TypeId=2&NewsId=859

Read More
ASP

Determine Width and Height of uploaded image

This code was found at www.4guysfromrolla.com and is very cool.

It will most often determine whether or not a file is an image, though in rare instances it can give a false positive.  The script will then return the height, width and colour depth.

Note at the bottom is a test area to determine whether it is working.  You can change the folder so it finds some images on your system.  I have it commented out right now.

This hooks in with Pure ASP Upload V1.5 and V2.0 quite nicely.  I have used it as an include file with success. 

Read More
Databases

Time/Date Manipulation

This method explains how to manipulate the server generated Date(), Time() etc functions.

I found this useful since I have a UK site hosted in the US which resulted in all my date/times being incorrect due to the server being on US time. 

Read More
Databases

How to generate an ADO Connection String

For database connections in UltraDev you often need to supply an ADo Connection String. Here is a tip how to generate such string very easily.
(Windows only)

Read More