<% dbconn = "DRIVER=SQL SERVER; SERVER=neese.db.4723398.hostedresource.com; DATABASE=neese; UID=neese; PWD=AlanW1958;" %> <% '-------------------------------------------------------------------- ' Microsoft ADO ' ' (c) 1996 Microsoft Corporation. All Rights Reserved. ' ' Version 2.0 - March 16, 2009 ' ' ADO constants include file for VBScript ' '-------------------------------------------------------------------- '---- Alan's Add-In Constants ---- sql="" Const cr="
" Const cr2="

" Const sp=" " Const datagrid_headings = "#855E42" Const s3_hint_box_bg_color = "#ffffcc" Const s3_light_blue = "#DDE7ED" mail_message = "" wk_date_and_time = dateadd("h",2,now()) '---- CursorTypeEnum Values ---- Const adOpenForwardOnly = 0 Const adOpenKeyset = 1 Const adOpenDynamic = 2 Const adOpenStatic = 3 '---- CursorOptionEnum Values ---- Const adHoldRecords = &H00000100 Const adMovePrevious = &H00000200 Const adAddNew = &H01000400 Const adDelete = &H01000800 Const adUpdate = &H01008000 Const adBookmark = &H00002000 Const adApproxPosition = &H00004000 Const adUpdateBatch = &H00010000 Const adResync = &H00020000 Const adNotify = &H00040000 '---- LockTypeEnum Values ---- Const adLockReadOnly = 1 Const adLockPessimistic = 2 Const adLockOptimistic = 3 Const adLockBatchOptimistic = 4 '---- ExecuteOptionEnum Values ---- Const adRunAsync = &H00000010 '---- ObjectStateEnum Values ---- Const adStateClosed = &H00000000 Const adStateOpen = &H00000001 Const adStateConnecting = &H00000002 Const adStateExecuting = &H00000004 '---- CursorLocationEnum Values ---- Const adUseServer = 2 Const adUseClient = 3 '---- 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 '---- FieldAttributeEnum Values ---- Const adFldMayDefer = &H00000002 Const adFldUpdatable = &H00000004 Const adFldUnknownUpdatable = &H00000008 Const adFldFixed = &H00000010 Const adFldIsNullable = &H00000020 Const adFldMayBeNull = &H00000040 Const adFldLong = &H00000080 Const adFldRowID = &H00000100 Const adFldRowVersion = &H00000200 Const adFldCacheDeferred = &H00001000 '---- EditModeEnum Values ---- Const adEditNone = &H0000 Const adEditInProgress = &H0001 Const adEditAdd = &H0002 Const adEditDelete = &H0004 '---- RecordStatusEnum Values ---- Const adRecOK = &H0000000 Const adRecNew = &H0000001 Const adRecModified = &H0000002 Const adRecDeleted = &H0000004 Const adRecUnmodified = &H0000008 Const adRecInvalid = &H0000010 Const adRecMultipleChanges = &H0000040 Const adRecPendingChanges = &H0000080 Const adRecCanceled = &H0000100 Const adRecCantRelease = &H0000400 Const adRecConcurrencyViolation = &H0000800 Const adRecIntegrityViolation = &H0001000 Const adRecMaxChangesExceeded = &H0002000 Const adRecObjectOpen = &H0004000 Const adRecOutOfMemory = &H0008000 Const adRecPermissionDenied = &H0010000 Const adRecSchemaViolation = &H0020000 Const adRecDBDeleted = &H0040000 '---- GetRowsOptionEnum Values ---- Const adGetRowsRest = -1 '---- PositionEnum Values ---- Const adPosUnknown = -1 Const adPosBOF = -2 Const adPosEOF = -3 '---- enum Values ---- Const adBookmarkCurrent = 0 Const adBookmarkFirst = 1 Const adBookmarkLast = 2 '---- MarshalOptionsEnum Values ---- Const adMarshalAll = 0 Const adMarshalModifiedOnly = 1 '---- AffectEnum Values ---- Const adAffectCurrent = 1 Const adAffectGroup = 2 Const adAffectAll = 3 '---- FilterGroupEnum Values ---- Const adFilterNone = 0 Const adFilterPendingRecords = 1 Const adFilterAffectedRecords = 2 Const adFilterFetchedRecords = 3 Const adFilterPredicate = 4 '---- SearchDirection Values ---- Const adSearchForward = 0 Const adSearchBackward = 1 '---- ConnectPromptEnum Values ---- Const adPromptAlways = 1 Const adPromptComplete = 2 Const adPromptCompleteRequired = 3 Const adPromptNever = 4 '---- ConnectModeEnum Values ---- Const adModeUnknown = 0 Const adModeRead = 1 Const adModeWrite = 2 Const adModeReadWrite = 3 Const adModeShareDenyRead = 4 Const adModeShareDenyWrite = 8 Const adModeShareExclusive = &Hc Const adModeShareDenyNone = &H10 '---- IsolationLevelEnum Values ---- Const adXactUnspecified = &Hffffffff Const adXactChaos = &H00000010 Const adXactReadUncommitted = &H00000100 Const adXactBrowse = &H00000100 Const adXactCursorStability = &H00001000 Const adXactReadCommitted = &H00001000 Const adXactRepeatableRead = &H00010000 Const adXactSerializable = &H00100000 Const adXactIsolated = &H00100000 '---- XactAttributeEnum Values ---- Const adXactCommitRetaining = &H00020000 Const adXactAbortRetaining = &H00040000 '---- PropertyAttributesEnum Values ---- Const adPropNotSupported = &H0000 Const adPropRequired = &H0001 Const adPropOptional = &H0002 Const adPropRead = &H0200 Const adPropWrite = &H0400 '---- ErrorValueEnum Values ---- Const adErrInvalidArgument = &Hbb9 Const adErrNoCurrentRecord = &Hbcd Const adErrIllegalOperation = &Hc93 Const adErrInTransaction = &Hcae Const adErrFeatureNotAvailable = &Hcb3 Const adErrItemNotFound = &Hcc1 Const adErrObjectInCollection = &Hd27 Const adErrObjectNotSet = &Hd5c Const adErrDataConversion = &Hd5d Const adErrObjectClosed = &He78 Const adErrObjectOpen = &He79 Const adErrProviderNotFound = &He7a Const adErrBoundToCommand = &He7b Const adErrInvalidParamInfo = &He7c Const adErrInvalidConnection = &He7d Const adErrStillExecuting = &He7f Const adErrStillConnecting = &He81 '---- ParameterAttributesEnum Values ---- Const adParamSigned = &H0010 Const adParamNullable = &H0040 Const adParamLong = &H0080 '---- ParameterDirectionEnum Values ---- Const adParamUnknown = &H0000 Const adParamInput = &H0001 Const adParamOutput = &H0002 Const adParamInputOutput = &H0003 Const adParamReturnValue = &H0004 '---- CommandTypeEnum Values ---- Const adCmdUnknown = &H0008 Const adCmdText = &H0001 Const adCmdTable = &H0002 Const adCmdStoredProc = &H0004 '---- SchemaEnum Values ---- Const adSchemaProviderSpecific = -1 Const adSchemaAsserts = 0 Const adSchemaCatalogs = 1 Const adSchemaCharacterSets = 2 Const adSchemaCollations = 3 Const adSchemaColumns = 4 Const adSchemaCheckConstraints = 5 Const adSchemaConstraintColumnUsage = 6 Const adSchemaConstraintTableUsage = 7 Const adSchemaKeyColumnUsage = 8 Const adSchemaReferentialContraints = 9 Const adSchemaTableConstraints = 10 Const adSchemaColumnsDomainUsage = 11 Const adSchemaIndexes = 12 Const adSchemaColumnPrivileges = 13 Const adSchemaTablePrivileges = 14 Const adSchemaUsagePrivileges = 15 Const adSchemaProcedures = 16 Const adSchemaSchemata = 17 Const adSchemaSQLLanguages = 18 Const adSchemaStatistics = 19 Const adSchemaTables = 20 Const adSchemaTranslations = 21 Const adSchemaProviderTypes = 22 Const adSchemaViews = 23 Const adSchemaViewColumnUsage = 24 Const adSchemaViewTableUsage = 25 Const adSchemaProcedureParameters = 26 Const adSchemaForeignKeys = 27 Const adSchemaPrimaryKeys = 28 Const adSchemaProcedureColumns = 29 function getSSS(SQLStringTemp) set getSSS = Server.CreateObject("ADODB.Recordset") getSSS.ActiveConnection = dbConn getSSS.Source = SQLStringTemp getSSS.CursorType = 0 getSSS.CursorLocation = 2 getSSS.LockType = 3 getSSS.Open ' Sample Call ' SQLstring = "select * from ?????" ' set myRS = getSSS(SQLstring) end function function getDB(SQLStringTemp) set getDB = Server.CreateObject("ADODB.Recordset") getDB.ActiveConnection = dbConn getDB.Source = SQLStringTemp getDB.CursorType = 0 getDB.CursorLocation = 2 getDB.LockType = 3 getDB.Open ' Sample Call ' SQLstring = "select * from ?????" ' set myRS = getDB(SQLstring) end function sub showsql() response.write "sql: " & sql & cr response.end end sub Function CSQ(byVal str) If IsNull(str) Then str = "" CSQ = Replace(str,"'","''") End Function sub buildtextbox(name,value,size,maxsize) %> <% end sub sub buildradiobutton(name,value,checked) if checked = "y" then %> <% else %> <% end if end sub sub buildcheckbox(name,value,checked) if checked = "y" then %> <% else %> <% end if end sub sub show_form_values() response.Write "" response.write "" For x = 1 to Request.Form.Count response.Write "" Response.Write "" Response.Write "" Next response.write "
Form Values - ver 1.0
" & Request.Form.Key(x) & "" & Request.Form.Item(x) & "

" end sub sub buildSubmitButton(name,value) %> <% end sub sub rw (title,value) 'Examples: ' rw "wk_name",wk_name Displays the values of wk_name. ' rw "","" Gives a blank line. if len(title)>0 then response.write "[" & (title) & "] " & "" if len(value)>0 then response.write " = {" & value & "}" & cr else response.write cr end if else response.write cr end if end sub sub rw2 (title,value) 'Examples: ' rw "wk_name",wk_name Displays the values of wk_name. ' rw "","" Gives a blank line. if len(title)>0 then response.write "[" & (title) & "] " & "" if len(value)>0 then response.write " = {" & value & "}" & cr else response.write cr end if else response.write cr end if response.write cr end sub %> <% sub sendmail() 'Installed this version on 11/20/2008. 'Changed the From Address to sThree@sportsschedulingsystem.com on 7/11/2011. 'Trying to get emails through to the Comcast email users. sendUrl="http://schemas.microsoft.com/cdo/configuration/sendusing" smtpUrl="http://schemas.microsoft.com/cdo/configuration/smtpserver" ' Set the mail server configuration Set objConfig=CreateObject("CDO.Configuration") objConfig.Fields.Item(sendUrl)=2 ' cdoSendUsingPort objConfig.Fields.Item(smtpUrl)="relay-hosting.secureserver.net" objConfig.Fields.Update ' Create and send the mail Set objMail=CreateObject("CDO.Message") ' Use the config object created above Set objMail.Configuration=objConfig 'Commented out for Joe Steffen on 6/3/2010. 'if mail_from_address = "" then ' objMail.From="s3@sportsschedulingsystem.com" 'else ' objMail.From=mail_from_address 'end if 'All emails come from s3 instead of MailMgr. objMail.From="mailmgr@lockerroomtech.com" objMail.To=mail_to_address objMail.Bcc = mail_to_bcc_address 'installed 4/17/2008. objMail.Subject=mail_subject objMail.HtmlBody=mail_message objmail_debug="n" if objmail_debug="y" then response.Write("Send Mail - Displays" & cr) response.Write("") response.Write("objMail.From: " & objmail.from & cr) response.write("objMail.To: " & objmail.to & cr) response.write("objMail.Bcc: " & objmail.bcc & cr) response.Write("objMail.Subject: " & objmail.subject & cr) response.Write("objMail.HtmlBody: " & cr & objmail.HtmlBody ) end if objMail.Send end sub %> <% already_entered="?" if request("submit") = "Send" and request("email") <> "" then on error resume next sql = "insert into [book_signups] ([email],[datetimestamp]) values ('" sql = sql & request("email") & "','" & wk_date_and_time & "')" set rs = getdb(sql) response.write "err.number is " & err.number & cr 'response.write "err.description is " & err.description & cr2 if err.number <> 0 then already_entered="y" else already_entered="n" end if on error goto 0 'Email. mail_to_address = "alan@neeses.com" mail_subject = "Organize Yourself in the Cloud - Signup!" mail_message = "The following email was just received " & request("email") call sendmail end if %>
 

"Organize Yourself in the Cloud" eBook by Alan Neese

This eBook will show you how to get more organized using services such as Google Mail, Dropbox and Evernote.  By organized I mean that you will be able to find things that you are looking for, like that email that your Dad sent you last year.  How about that receipt for that new TV you bought a few years back?  All of these things can be organized so that you can retrieve them in the cloud.  These services play an important part in the day to day activities in my life.  They help me keep my business running smoothly and my family life also.  I want to show you how you too can be organized like me.

Enter your email address below
and we'll let you know when the
book is ready for purchase!

Email Address  
 
 
 
<% if already_entered="y" then response.write "The email address '" & request("email") & "' has already been entered." end if if already_entered="n" then response.write "We have received your email address. Thank You!" end if %>