Home > database >  Microsoft VBScript runtime error (0 x800a000d) type mismatch: 'Card_Number'
Microsoft VBScript runtime error (0 x800a000d) type mismatch: 'Card_Number'

Time:09-30

HTTP error 500.100 - internal server error - ASP error
Internet information service

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Technical information (for support)

Error types:
Microsoft VBScript runtime error (0 x800a000d)
Type mismatch: 'Card_Number'
/Card_Add. Asp, 56 lines

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
<% @ LANGUAGE="VBSCRIPT" CODEPAGE="936" % & gt;
<%
The Public Function GetRndString (ByVal intNum)
If intNum & lt;=0 Then the Exit Function
Dim I
Dim intLength
'//these characters used for seed
Const STRINGSOURCE="0123456789"
IntLength=Len (STRINGSOURCE) - 1

Randomize
For I=1 To intNum
'//use Mid Rnd function every time from seeds randomly selected a character in the string
GetRndString=GetRndString & amp; Mid (STRINGSOURCE, Int (Rnd * intLength + 1), 1)
Next
End the Function
'============================================
'how many digits are used: the random function
'and count: the number
'return values: random number
'call: GetRamCode (digital)
'============================================
The Public Function GetRamCode (f_number)
Randomize
Dim f_Randchar f_Randchararr, f_RandLen f_Randomizecode, f_iR
F_Randchar="0,1,2,3,4,5,6,7,8,9, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z"
F_Randchararr=Split (f_Randchar, ", ")
F_RandLen=f_number 'define the password length or digits
For f_iR=1 To f_RandLen
F_Randomizecode=f_Randomizecode & amp; F_Randchararr (Int (* Rnd (21)))
Next
GetRamCode=f_Randomizecode
End the Function
'==============================================
If Trim (Request Form (" Action ")="Submit" Then
Card_Len=Trim (Request Form (" Card_Len "))
If Card_Len & gt; 0 Then
SQL="Select * from [D_VIP] order by id desc"
Set the Rs=CN. The execute (SQL)
If the Rs. Bof and Rs. Eof Then
Card_Number=100000
The Else
Card_Number=Rs (" Card_Number ")
End the if
Rs. Close
Set the RS=Nothing

For I=1 to Card_Len
'Card_Number=GetRndString (8)
Activation_Number=GetRamCode (6)
Sql="Select * from [D_VIP]"
Set the Rs=server. CreateObject (" ADODB. You ")
Rs. The open SQL, Cn, 1, 3
Rs. Addnew
Rs (" Card_Number ")=Card_Number + I
Rs (" Activation_Number ")=Activation_Number
Rs (" Period_Time ")=the Date ()
Rs. Update
Rs. Requery
Rs. Close
Set the RS=Nothing
Next
End the if
Response. Write (" & lt; script> Alert (' birth of success! '); Location='VIP_card. Asp; </script>" )
The Response. The End ()
End the if

%>

Problem complement: Rs (" Card_Number ")=Card_Number + I is this line
  • Related