Archive for October, 2008

Error Type: Server object, ASP 0177 (0×800401F3) Invalid class string

Wednesday, October 22nd, 2008

Error Type:
Server object, ASP 0177 (0×800401F3)
Invalid class string

(more…)

ADODB.Command

Wednesday, October 15th, 2008

Dim cmd
SET cmd = Server.CreateObject(”ADODB.command”)
WITH cmd
.CommandType = adCmdStoredProc
.CommandText = “”
.ActiveConnection = “”
.Parameters.Append .CreateParameter(”@bbID”,adSingle,adParamInput,3,)
.Parameters.Append .CreateParameter(”@raCode”,adVarChar,adParamOutput,,”")
.Execute, , adBinary

‘adOpenStatic,adLockBatchOptimistic
‘adOpenForwardOnly,adLockReadOnly
‘adOpenStatic,adLockReadOnly
‘adOpenDynamic,adLockOptimistic
END WITH

Set cmd = nothing

‘—- DataTypeEnum Values —-
Const adEmpty = 0
Const adTinyInt = 16
Const adSmallInt = 2
Const adInteger = 3
Const adBigInt = 20
Const adUnsignedTinyInt = 17
Const adUnsignedSmallInt = 18
Const adUnsignedInt = 19
Const adUnsignedBigInt = 21
Const adSingle = 4
Const adDouble = 5
Const adCurrency = 6
Const adDecimal = 14
Const adNumeric = 131
Const adBoolean = 11
Const adError = 10
Const adUserDefined = 132
Const adVariant = 12
Const adIDispatch = 9
Const adIUnknown = 13
Const adGUID = 72
Const adDate = 7
Const adDBDate = 133
Const adDBTime = 134
Const adDBTimeStamp = 135
Const adBSTR = 8
Const adChar = 129
Const adVarChar = 200
Const adLongVarChar = 201
Const adWChar = 130
Const adVarWChar = 202
Const adLongVarWChar = 203
Const adBinary = 128
Const adVarBinary = 204
Const adLongVarBinary = 205
Const adChapter = 136
Const adFileTime = 64
Const adPropVariant = 138
Const adVarNumeric = 139
Const adArray = &H2000

Ajax in classic ASP: Data Not Refreshed

Sunday, October 12th, 2008

Add these line of codes to the page.

(http://www.aspkey.net/aspkey/_articles/asp/showarticle.asp)

<%@ LANGUAGE="VBSCRIPT" %>
<!--#Include virtual = "adovbs.inc"-->
<%
    Response.Buffer=true
    Response.AddHeader "cache-control", "private"
    Response.AddHeader "pragma", "no-cache"
    Response.ExpiresAbsolute = #January 1, 1990 00:00:01#
    Response.Expires=Now()-1
    Response.AddHeader "Cache-Control", "must-revalidate"
    Response.AddHeader "Cache-Control", "no-cache"
%>

Validate Phone Number

Friday, October 10th, 2008
  1. function isPhoneNumber(s)
  2. {
  3. // Check for correct phone number
  4. rePhoneNumber = new RegExp(/^\([1-9]\d{2}\)\s?\d{3}\-\d{4}$/);
  5. if (!rePhoneNumber.test(s)) {
  6. alert(Phone Number Must Be Entered As: (555) 555-1234″);
  7. return false;
  8. }
  9. return true;
  10. }