|
Blue Forest http://www.lslnet.com at 8:28 on August 25, 2006
String, Hao Fan, not always understand, goodhearted people, help -
I defined
Kkk= "12,545,825,21"
Select * from XXXX Where id in ( "&kkk&")
Varchar value will be '12,545,825,21'
Out of the int data type conversion when grammatical mistakes.
Can be used to change the function, Where id in ( "&kkk&") mistakes |
Use Clng |
Used, but you yourselves
For example, I selected a number of "Xuankuang"
Request ( "checkbox") is the type of data that way? |
Write a function, as follows :
[code]
Function str2int (str)
If str= "" or isnull (str) then
Str2int=0
Exit Function
End if
Dim arrStr, iii
ArrStr=split (str, "")
If ubound (arrStr) = 0 then
Str2int=0
Exit Function
End if
For iii=0 to ubound (arrStr)
If isnumeric (arrStr (iii)) then
Str2int=str2int&clng (arrStr (iii)) & ""
End if
Next
If right (str2int,1) = "" then str2int=left (str2int, entrants (str2int) -1)
End Function
Str= "1,2,3,4,5,6,20,1, sss"
Sql= "select * from where id in t_line (" &str2int (str) & ")"
[/code] |
Thank you, spill-show clng
I changed how the procedures are as follows :
[code]
Response.Cookies ( "A") ( "B") =request.Cookies ( "A") ( "B") + "," +bid
Rs.open "Select * from XXXXX Where id in ( '" &request.Cookies ( "A") ( "B") & "')," cn,1,1
[/code]
Varchar value will be '214,215,214,214,215' conversion of the int data type as shown when grammatical mistakes.
|
...
The grammatical mistakes of your own procedures, and what little to no change. . .
[code]
Response.Cookies ( "A") ( "B") =request.Cookies ( "A") ( "B") + "," +bid
Rs.open "Select * from XXXXX Where id in ( '" &request.Cookies ( "A") ( "B") & "')," cn,1,1
[/code]
Changed
[code]
Response.Cookies ( "A") ( "B") =request.Cookies ( "A") ( "B") + "," +bid
Rs.open "Select * from XXXXX Where id in (" &request.Cookies ( "A") ( "B") & ")," cn,1,1
[/code]
Removed in id () inside a single quotation marks! |
Quote, the OK - |
|