一个不错的竞价程序

源代码在线查看: function.asp

软件大小: 492 K
上传用户: downloader_006
关键词: 程序
下载地址: 免注册下载 普通下载 VIP

相关代码

								Function SQLVal(pvValue)
				   Dim sTemp
				
				   Select Case VarType(pvValue)
				      Case 0, 1:
				         SQLVal = "NULL"
				      Case 2, 3, 4, 5, 6:
				         SQLVal = "" & pvValue
				      Case 8: 'String
				         sTemp = Trim(pvValue)
				         On Error Resume Next
				         SQLVal = "" & CDbl(sTemp)
				         If Err.Number  0 Then
				            Err.Clear
				            SQLVal = "NULL"
				         End If
				      Case 11:
				         SQLVal = "" & Cint(pvValue)         
				      Case Else
				         SQLVal = "NULL"
				   End Select
				End Function
				Function aspeasehtml( psValueName )
				 Dim sTemp
				   Select Case VarType(psValueName)
				      Case 0, 1:
				         sTemp = "NULL"
				      Case 2, 3, 4, 5, 6:
				         sTemp = "" & psValueName
				         sTemp = Replace(sTemp, "'", "''")
				         'SQLStr = sTemp 
				      Case 7: 'DateTime
				         sTemp = FormatDateTime(psValueName)
				         sTemp = Replace(sTemp, "'", "''")
				         'SQLStr = sTemp 
				      Case 8: 'String
				         sTemp = psValueName
				         sTemp = Replace(sTemp, "'", "''")
					 'sTemp = Replace(sTemp, chr(10), "")
				         If Len(Trim(sTemp)) > 0 Then
				            sTemp = sTemp 
				         Else
				            sTemp = "NULL"
				         End If
				      Case Else
				         sTemp = "NULL"
				   End Select
				  
				   sTemp = server.htmlencode(sTemp)
				
				   
				  aspeasehtml = sTemp
				End Function
				
				Function Rst( psValueName )
				   Dim sTemp 
				   sTemp = Request.Form("" & psValueName)
				   If Len(Trim(sTemp)) = 0 Then
				      sTemp = Request.QueryString("" & psValueName)
				   End If
				   Rst = sTemp
				End Function
				Function FVal(pvValue)
				   Dim sTemp
				
				   Select Case VarType(pvValue)
				      Case 0, 1:
				         FVal = 0
				      Case 2, 3, 4, 5, 6:
				         FVal = pvValue
				      Case 8: 'String
				         sTemp = Trim(pvValue)
				         On Error Resume Next
				         FVal = CDbl(sTemp)
				         If Err.Number  0 Then
				            Err.Clear
				            FVal = 0
				         End If
				      Case Else
				         FVal = 0
				   End Select
				End Function
				Function SQLStr(pvValue)
				   Dim sTemp
				   Select Case VarType(pvValue)
				      Case 0, 1:
				         SQLStr = "NULL"
				      Case 2, 3, 4, 5, 6:
				         sTemp = "" & pvValue
				         sTemp = Replace(sTemp, "'", "''")
				         SQLStr = sTemp 
				      Case 7: 'DateTime
				         sTemp = FormatDateTime(pvValue)
				         sTemp = Replace(sTemp, "'", "''")
				         SQLStr = sTemp 
				      Case 8: 'String
				         sTemp = pvValue
				         sTemp = Replace(sTemp, "'", "''")
				         If Len(Trim(sTemp)) > 0 Then
				            SQLStr = sTemp 
				         Else
				            SQLStr = "NULL"
				         End If
				      Case Else
				         SQLStr = "NULL"
				   End Select
				End Function
				%>			

相关资源