asp string to integer to numeric
asp str2int
asp strtoint
asp str2int
asp strtoint
asp-str-to-int
asp-val()
Dim A, B, C
Set rs = Server.CreateObject("ADODB.Recordset")
strSql = "Exec [dbo].[some_sp] IND"
rs.open strSql,CN,3,3
Do While Not rs.EOF
'these columns are returned as decimal(10,2) format
A = rs("col1")
B = rs("col2")
rs.MoveNext
Loop
C = A + B 'i get type mismatch error here
Variables in ASP/VBScript are just variant types so you may need to convert the values explicitly.
C = CDbl(A) + CDbl(B)
沒有留言:
張貼留言