'**************************************************' Function name: R' Parameters: Strchar-----The characters to filter' Return value: Filtered character'**************************************************
Public Function R (Strchar)
If Strchar = "" Or IsNull (strchar) Then R = "": Exit Function
Dim Strbadchar, Arrbadchar, Tempchar, I
' Strbadchar = ' $,#, ',%,^,,?, (,), Strbadchar = "+, ',--,%,^,,?, (,), Arrbadchar = Split (Strbadchar, ",")
/********************Function Name: Istelephonefunction function: fixed, mobile phone number check function, return True, reverse, return falsefunction parameters: obj, number to be checkedCheck rule:(1) Number, "(", ")" and "-"(2) The phone number is 3 to 8 digits(3) If the phone number contains an area code, then the area code is three-bit or four-bit(4) The area code is separated by "(", ")" or "-" and other parts(5) The mobile phone number is 11 or 12 bits, if 12 bits, then the first digit i
minus the corresponding operator. During decryption, you only need to add the corresponding operator to each character in this order.Tempchar = CHR (tempnum-otherarr (I mod 4 ))If tempchar = CHR (34) thenTempchar = CHR (18)End ifTempstring = tempstring tempcharNext'String containing the decryption algorithmUnlockstr = "execute (" "dim keyarr (3), thistext" " vbcrlf " "keyarr (0) =" otherarr (0) "" vbcrlf "" keyarr (1) = " otherarr (1) " " vbcrlf
Copy codeThe Code is as follows: '*************************************** ***********
'Function name: R
'Usage: Filter invalid SQL characters
'Parameter: strChar ----- the character to be filtered
'Return value: filtered characters
'*************************************** ***********
Public Function R (strChar)
If strChar = "" Or IsNull (strChar) Then R = "": Exit Function
Dim strBadChar, arrBadChar, tempChar, I
'Strbadchar = "$, #, ', %, ^ ,,?, (,),
'**************************************************
' Function name: Replacebadchar
' Function: Filter illegal SQL characters
' Parameters: Strchar-----The characters to filter
' Return value: Filtered character
' Source: www.coredata.cn
'**************************************************
Function Replacebadchar (Strchar)
If Strchar = "" Or IsNull (Strchar) Then
Replacebadchar = ""
Exit Function
End If
Dim Strbadchar, Arrbadchar, Tempchar,
Copy Code code as follows:
'**************************************************
' Function name: R
' Function: Filter illegal SQL characters
' Parameters: Strchar-----The characters to filter
' Return value: Filtered character
'**************************************************
Public Function R (Strchar)
If Strchar = "" Or IsNull (strchar) Then R = "": Exit Function
Dim Strbadchar, Arrbadchar, Tempchar, I
' Strbadchar = ' $,#, ',%,^,,?,
@ Re Varbinary ( 8000 ), @ Tempchar Varchar ( 2 ), @ Getchar Varchar ( 1 ), @ Getint Int , @ N Int , @ Totalint Int , @ I Int , @ Tempint Int , @ Runnum Int -- Number of string CIDR blocks Select @ Tempchar = '' , @ I = Datalength ( @ Char ), @ Re = 0x; If ( @ I > 0 ) Begin If (@ I % 2 = 0 ) Set @ Runnum = @ I / 2 Else Set @ Run
operator. During decryption, you only need to add the corresponding operator to each character in this order.TempChar = Chr (TempNum-OtherArr (I Mod 4 ))If TempChar = Chr (34) ThenTempChar = Chr (18)End IfTempString = TempString TempCharNext'String containing the decryption algorithmUnLockStr = "Execute (" "Dim KeyArr (3), ThisText" " vbCrLf " "KeyArr (0) =" OtherArr (0) "" vbCrLf "" KeyArr (1) = " OtherArr (1) " " vbCrLf " "KeyArr (2) =" Other
When I'm going to get a numeric variant of STRValue=saferequest ("str", 1,0)To get the value in the parameter str, and to make a numeric judgment, which is not numeric or empty, value equals 0, otherwise, value equals the values of request ("str").
function Saferequest (paraname,paratype,lenlimit)Dim paravalueParavalue = Trim (Request (Paraname))If Paratype = 1 ThenIf IsNull (Paravalue) or (not IsNumeric (paravalue)) ThenParavalue = LenlimitEnd IfElseIf IsNull (Paravalue) ThenParavalue = ""E
directly.The Code is as follows:Copy codeThe Code is as follows:-- ===================================================== ========-- FUNCTION hexstr2varbin-- Convert varchar data to varbinary-- ===================================================== ========IF OBJECT_ID ('dbo. hexstr2varbin') IS NOT NULLDrop function dbo. hexstr2varbinGOCREATE function [dbo]. [hexstr2varbin] (@ Char varchar (8000). Returns varbinary (8000)AsBeginDeclare @ re varbinary (8000), @
varbinary data directly.
The Code is as follows:Copy codeThe Code is as follows: -- ===================================================== ========-- FUNCTION hexstr2varbin-- Convert varchar data to varbinary-- ===================================================== ========IF OBJECT_ID ('dbo. hexstr2varbin') IS NOT NULLDrop function dbo. hexstr2varbinGOCREATE function [dbo]. [hexstr2varbin] (@ Char varchar (8000). Returns varbinary (8000)AsBeginDeclare @ re varbinary (8000), @
:
Copy Code code as follows:
--==============================================
--FUNCTION Hexstr2varbin
--Converts the data of the varchar type to the varbinary type
--==============================================
IF object_id (' Dbo.hexstr2varbin ') is not NULL
DROP FUNCTION Dbo.hexstr2varbin
Go
CREATE function [dbo]. [Hexstr2varbin] (
@char varchar (8000)
) returns varbinary (8000)
As
Begin
DECLARE @re varbinary (8000), @tempchar
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.