% ' Tom Wishon Golf Technology ' This page calls SQL Server stored procedure RecommendShaft to make shaft recommendations. ' This page is intended to be integrated with WishonGolf.com, which is a PHP site. With Chris Nichols ' approval, I implemented this page in ASP, which has better error reporting and error trapping. ' ' Author: Donald Scott ' Moutain Sage Software ' DonScott@mss01.com ' (970) 382-0811 ' ' Date: 04/16/2010 ' Option Explicit '---- These constants are used ADODB. '---- CursorTypeEnum Values -------- Public Const adOpenForwardOnly = 0 Public Const adOpenKeyset = 1 Public Const adOpenDynamic = 2 Public Const adOpenStatic = 3 '---- LockTypeEnum Values ------- Public Const adLockReadOnly = 1 Public Const adLockPessimistic = 2 Public Const adLockOptimistic = 3 Public Const adLockBatchOptimistic = 4 '---- CommandTypeEnum Values ------- Public Const adCmdText = &H1 Public Const adCmdTable = &H2 Public Const adCmdStoredProc = &H4 '---- ExecuteOptionEnum ------- Public Const adAsyncExecute = 16 Public Const adAsyncFetch = 32 Public Const adAsyncFetchNonBlocking = 64 Public Const adExecuteNoRecords = 128 Public Const adExecuteStream = 1024 '---- DataTypeEnum Values -------------- Public Const adChar = 129 Public Const adCurrency = 6 Public Const adDecimal = 14 Public Const adDouble = 5 Public Const adInteger = 3 Public Const adSmallInt = 2 Public Const adVarChar = 200 '---- ParameterDirectionEnum Values -------------- Public Const adParamInput = 1 Public Const adParamInputOutput = 3 Public Const adParamOutput = 2 Public Const adParamReturnValue = 4 Public Const adParamUnknown = 0 '---- Application constants ---------- Public Const constNBSP = " " '----- Application Variables ------------- Dim blnDevMode Dim blnFirstLoad Dim cmdRecommendShaft Dim cnnADO Dim lngRowsAffected Dim rstProduct Dim strDiag Dim strErrMsg Dim strSelectDSTe1 Dim strSelectDSTe2 Dim strSelectDSTe3 Dim strSelectDSTr1 Dim strSelectDSTr2 Dim strSelectDSTr3 Dim strSelectPS1 Dim strSelectPS2 Dim strSelectPS3 Dim strSelectWR1 Dim strSelectWR2 Dim strSelectWR3 Dim strSql Dim strX ' These variables correspond to the parameters on the stored proc. Dim intDownswingTempo Dim intDownswingTransistion' Dim intErrNum Dim intIronSwingSpeed Dim intPhysicalStrength Dim intWoodSwingSpeed Dim intWristRelease Dim strRecomGraphiteIronShaft Dim decRecomGraphiteIronTipTrim Dim strRecomHybridShaft Dim decRecomHybridTipTrim Dim strRecomSteelIronShaft Dim decRecomSteelIronTipTrim Dim strRecomWoodShaft Dim decRecomWoodTipTrim '----- General Functions --------------------------------- Public Function appCInt(objValue) ' Convert the specified value to integer; to 0 if it's not numeric. appCInt = 0 If IsNumeric(objValue) Then appCInt = CInt(objValue) End If End Function Private Sub AppendError(strMsg) If Len(strMsg) > 0 Then strErrMsg = strErrMsg & strMsg & vbNewLine End If End Sub Set cnnADO = Server.CreateObject("ADODB.Connection") Set rstProduct = Server.CreateObject("ADODB.Recordset") %>