title: Invalid precision value writing to Oracle wth VBSript
body: <p>Since you all led me in the right direction yesterday, I'm back. I am migrating from windows 2003 to windows 2012. A couple of small, but vital, apps are written in asp (VBScript) and an Oracle 11g DB. Many of the DB calls are failing. The latest is a procedure call. I don't write VBScript so I'm struggling here. The driver is Oracle in OraClient11g_home2</p>
  
  <p>Thanks in advance.</p>
  
  <p>The fields: </p>
  
  <pre><code> 'P_PAX_ID                       NUMBER(5)               IN
   'P_YEAR                         VARCHAR2(4)             IN
   'P_CARDNUMBER                   VARCHAR2(16)            IN
   'P_EXPDATE                      VARCHAR2(4)             IN
   'P_PREFIX                       VARCHAR2(5)             IN
   'P_FIRST_NAME                   VARCHAR2(20)            IN
   'P_LAST_NAME                    VARCHAR2(20)            IN
   'P_SUFFIX                       VARCHAR2(5)             IN
   'P_ADDRESS                      VARCHAR2(100)           IN
   'P_CITY                         VARCHAR2(30)            IN
   'P_STATE                        VARCHAR2(2)             IN
   'P_ZIP                          VARCHAR2(9)             IN
   'P_AMT                          NUMBER(10,2)            IN
   'P_STATUS                       VARCHAR2(10)            IN
   'P_SOURCE                       VARCHAR2(1)             IN
   'P_CC_ID                        NUMBER(10)              OUT
   'P_ERR_CD                       VARCHAR2                OUT
   'P_ERR_MSG                      VARCHAR2                OUT
   'P_ACCT_ID                      VARCHAR2(4)             IN     DEFAULT
   'P_BATCH_ID                     NUMBER(5)               IN     DEFAULT
   'P_BATCH_ITEM                   NUMBER(3)               IN     DEFAULT
   'P_BATCH_DT                     DATE                    IN     DEFAULT
   'P_VERISIGN_RESULT              NUMBER(10)              IN     DEFAULT
   'P_VERISIGN_PNREF               VARCHAR2(12)            IN     DEFAULT
   'P_VERISIGN_RESPMSG             VARCHAR2(2000)          IN     DEFAULT
   'P_VERISIGN_CARDSECURE          VARCHAR2(1)             IN     DEFAULT
  </code></pre>
  
  <p>The code:</p>
  
  <pre><code>With cmdCCpayment
      .CommandText = "{call package.procedure( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? )}"
      .CommandType = 1 'adCmdText
      .ActiveConnection= objConnSessionAuth
      'P_PAX_ID
      .Parameters(0).Type = 131  'adNumeric
      .Parameters(0).Direction = 1  'adParamInput
      .Parameters(0).Value = session("pax_id")
      'P_YEAR
      .Parameters(1).Type = 200  'adVarChar
      .Parameters(1).Direction = 1  'adParamInput
      .Parameters(1).Value = session("user_year")         'session("user_year")
      'P_CARDNUMBER
      .Parameters(2).Type = 200  'adVarChar
      .Parameters(2).Direction = 1  'adParamInput
      .Parameters(2).Value = Session("cc_number")
      'P_EXPDATE
      .Parameters(3).Type = 200  'adVarChar
      .Parameters(3).Direction = 1  'adParamInput
      .Parameters(3).Value = Session("cc_exp_month") &amp; Session("cc_exp_year")
      'P_PREFIX
      .Parameters(4).Type = 200  'adVarChar
      .Parameters(4).Direction = 1  'adParamInput
      .Parameters(4).Value = Session("cc_prefix")
      'P_FIRST_NAME
      .Parameters(5).Type = 200  'adVarChar
      .Parameters(5).Direction = 1  'adParamInput
      .Parameters(5).Value = Session("cc_f_name")
      'P_LAST_NAME
      .Parameters(6).Type = 200  'adVarChar
      .Parameters(6).Direction = 1  'adParamInput
      .Parameters(6).Value = Session("cc_l_name")
      'P_SUFFIX
      .Parameters(7).Type = 200  'adVarChar
      .Parameters(7).Direction = 1  'adParamInput
      .Parameters(7).Value = Session("cc_suffix")
      'P_ADDRESS
      .Parameters(8).Type = 200  'adVarChar
      .Parameters(8).Direction = 1  'adParamInput
      .Parameters(8).Value = Session("cc_address")
      'P_CITY
      .Parameters(9).Type = 200  'adVarChar
      .Parameters(9).Direction = 1  'adParamInput
      .Parameters(9).Value = Session("cc_city")
      'P_STATE
      .Parameters(10).Type = 200  'adVarChar
      .Parameters(10).Direction = 1  'adParamInput
      .Parameters(10).Value = Session("cc_state")
      'P_ZIP
      .Parameters(11).Type = 200  'adVarChar
      .Parameters(11).Direction = 1  'adParamInput
      .Parameters(11).Value = Session("cc_zip")
      'P_AMT
      .Parameters(12).Type = 131  'adNumeric
      .Parameters(12).Direction = 1  'adParamInput
      .Parameters(12).Value = Session("cc_amt")
      'P_STATUS
      .Parameters(13).Type = 200  'adVarChar
      .Parameters(13).Direction = 1  'adParamInput
      .Parameters(13).Value = "PENDING"
      'P_SOURCE
      .Parameters(14).Type = 200  'adVarChar
      .Parameters(14).Direction = 1  'adParamInput
      .Parameters(14).Value = P_SOURCE
      'P_CC_ID
      .Parameters(15).Type =  131  'adNumeric
      .Parameters(15).Direction = 2  'adParamOutput
      'P_ERR_CD
      .Parameters(16).Type =  200  'adVarChar
      .Parameters(16).Direction = 2  'adParamOutput
      'P_ERR_MSG
      .Parameters(17).Type =  200  'adVarChar
      .Parameters(17).Direction = 2  'adParamOutput
  End With
  
  
  
  I HOPE THIS HELPS. I'm not and asp guy. I'm at my wits end.
  
  Dim objConnSessionAuth
  Set objConnSessionAuth = CreateObject("ADODB.Connection")
  strConn2 = "DSN=*****;"
  strConn2 = strConn2 &amp; "PWD=" &amp; userpassword &amp; ";" 
  strConn2 = strConn2 &amp; "UID=" &amp; userid &amp; ";" 
  'strConn2 = strConn2 &amp; "SERVER=" &amp; varEnvironment &amp; ";" 'this is set to dev or prod
  'objConnSessionAuth.Provider="MSDASQL.1"
  
  objConnSessionAuth.ConnectionString=strConn2
  'objConnSessionAuth.ConnectionString=strConn2
  objConnSessionAuth.CursorLocation=3 'adUseClient
  'to open this connection call this line
  objConnSessionAuth.Open
  
  
  Dim cmdCCpayment
  Set cmdCCpayment = Server.CreateObject("ADODB.Command")
  
  With cmdCCpayment
      .CommandText = "{call package.procedure( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? )}"
      .CommandType = 1 'adCmdText
      .ActiveConnection= objConnSessionAuth
      'P_PAX_ID
      .Parameters(0).Type = 131  'adNumeric
      .Parameters(0).Direction = 1  'adParamInput
      .Parameters(0).Value = session("pax_id")
      'P_YEAR
      .Parameters(1).Type = 200  'adVarChar
      .Parameters(1).Direction = 1  'adParamInput
      .Parameters(1).Value = session("user_year")         'session("user_year")
      'P_CARDNUMBER
      .Parameters(2).Type = 200  'adVarChar
      .Parameters(2).Direction = 1  'adParamInput
      .Parameters(2).Value = Session("cc_number")
      'P_EXPDATE
      .Parameters(3).Type = 200  'adVarChar
      .Parameters(3).Direction = 1  'adParamInput
      .Parameters(3).Value = Session("cc_exp_month") &amp; Session("cc_exp_year")
      'P_PREFIX
      .Parameters(4).Type = 200  'adVarChar
      .Parameters(4).Direction = 1  'adParamInput
      .Parameters(4).Value = Session("cc_prefix")
      'P_FIRST_NAME
      .Parameters(5).Type = 200  'adVarChar
      .Parameters(5).Direction = 1  'adParamInput
      .Parameters(5).Value = Session("cc_f_name")
      'P_LAST_NAME
      .Parameters(6).Type = 200  'adVarChar
      .Parameters(6).Direction = 1  'adParamInput
      .Parameters(6).Value = Session("cc_l_name")
      'P_SUFFIX
      .Parameters(7).Type = 200  'adVarChar
      .Parameters(7).Direction = 1  'adParamInput
      .Parameters(7).Value = Session("cc_suffix")
      'P_ADDRESS
      .Parameters(8).Type = 200  'adVarChar
      .Parameters(8).Direction = 1  'adParamInput
      .Parameters(8).Value = Session("cc_address")
      'P_CITY
      .Parameters(9).Type = 200  'adVarChar
      .Parameters(9).Direction = 1  'adParamInput
      .Parameters(9).Value = Session("cc_city")
      'P_STATE
      .Parameters(10).Type = 200  'adVarChar
      .Parameters(10).Direction = 1  'adParamInput
      .Parameters(10).Value = Session("cc_state")
      'P_ZIP
      .Parameters(11).Type = 200  'adVarChar
      .Parameters(11).Direction = 1  'adParamInput
      .Parameters(11).Value = Session("cc_zip")
      'P_AMT
      .Parameters(12).Type = 131  'adNumeric
      .Parameters(12).Direction = 1  'adParamInput
      .Parameters(12).Value = Session("cc_amt")
      'P_STATUS
      .Parameters(13).Type = 200  'adVarChar
      .Parameters(13).Direction = 1  'adParamInput
      .Parameters(13).Value = "PENDING"
      'P_SOURCE
      .Parameters(14).Type = 200  'adVarChar
      .Parameters(14).Direction = 1  'adParamInput
      .Parameters(14).Value = P_SOURCE
      'P_CC_ID
      .Parameters(15).Type =  131  'adNumeric
      .Parameters(15).Direction = 2  'adParamOutput
      'P_ERR_CD
      .Parameters(16).Type =  200  'adVarChar
      .Parameters(16).Direction = 2  'adParamOutput
      'P_ERR_MSG
      .Parameters(17).Type =  200  'adVarChar
      .Parameters(17).Direction = 2  'adParamOutput
  End With
  
  objConnSessionAuth.BeginTrans
  cmdCCpayment.Execute
  objConnSessionAuth.CommitTrans
  </code></pre>