title: Application uses a value of the wrong type for the current operation in classic asp
body: <p>I am calling one stored procedure using the following code:</p>
  
  <pre><code>m_objCmd.CommandText = "StoredProc_Name"
  m_objCmd.Parameters.Append m_objCmd.CreateParameter("@UserID", 3, 1, 0, UserID)
  m_objCmd.Parameters.Append m_objCmd.CreateParameter("@UserTypeID", 3, 1, 0, UserTypeID)
  m_objCmd.Parameters.Append m_objCmd.CreateParameter("@AccessToken", 202, 1, 100, AccessToken)
  m_objCmd.Parameters.Append m_objCmd.CreateParameter("@TokenExpiration", 135, 1, 0, TokenExpiration)
  m_objCmd.Parameters.Append m_objCmd.CreateParameter("@RefreshToken", 202, 1, 100, RefreshToken)
  
  rsUserData.Open m_objCmd, , adOpenStatic, adLockReadOnly  
  </code></pre>
  
  <p>In above:</p>
  
  <ul>
  <li><code>@UserID</code>  is a 'int' dataType</li>
  <li><code>@UserTypeID</code> is 'int'</li>
  <li><code>@AccessToken</code> is nVarchar(100)</li>
  <li><code>@TokenExpiration</code> is datatime(2)</li>
  <li><code>@RefreshToken</code> is nVarchar(100)</li>
  </ul>
  
  <p>But here I am getting the error:</p>
  
  <blockquote>
    <p>Application uses a value of the wrong type for the current operation.</p>
  </blockquote>
  
  <p>Can any one help me please.</p>