aRo`

automating your e-commerce

The code below gives a brief example on how to create an .xls file from an asp webpage. I use this to often to export my customers data(database) to an offline version wich they can use for archiving/reporting.
To to so you have to change the contenttype of the asp file to "application/vnd.ms-excel". This [...]

sending a mail with asp on win2k3

While migrating an application from an old IIS4(NT) server to a new win2003 machine there were some errors with emails.
It's always better to use a default component over a 3th party tool. That's why you should use CDO.
CDO (Collaboration Data Objects) is a Microsoft technology that is designed to simplify the creation of messaging applications.
However [...]

These HTTP Status codes are returned by the server to the client software to determine the outcome of a request.
The first digit of the status code specifies one of five classes of response.

1xx Informational
2xx Success
3xx Redirection
4xx Client Error
5xx Server Error

Each Status-Code is described below.

200: request completed (OK)
201: object created, reason = new URI
202: async completion [...]

The best way of connecting to a database is including a separated file with the database info. Afterwards u can always check if the database connection state is open.
MS SQL
set cnn = Server.CreateObject("ADODB.Connection")
cnn.ConnectionString = "Provider=SQLOLEDB.1;User ID=User;Passwd=;Initial Catalog=ASPDB;Data Source=server"
cnn.Open
Microsoft Access
set cnn = Server.CreateObject("ADODB.Connection")
cnn.Provider = "Microsoft.Jet.OLEDB.4.0"
cnn.ConnectionString = Server.MapPath ("/mywwwfolder") & "\database.mdb"
cnn.Open
check connection state
if cnn.State = 0 then
cnn.Open
end [...]