Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. OleDb Overflow error

OleDb Overflow error

Scheduled Pinned Locked Moved Database
databaseregexhelpquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TheJudeDude
    wrote on last edited by
    #1

    I am receiving an Overflow error from an INSERT statement. I understand this is because a value that is assigned to a variable is larger than the data type, correct? The database was built in Access. I pinned the values on screen while debugging and took a screen shot, which is linked herewhich is linked here. I have double checked the data types and they all seem to match.What am I missing? Thank you in advance. Here is the code:

    oleDbComQC.CommandText = "INSERT INTO RANKS ([ACCOUNTS], [EOB], [FPD], [F90P], [PDCHECK], [INCOME], [PD], [PD90P]) " +
    "VALUES(@ACCTS, @EOB, @FPD, @F90P, @PDC, @INC, @PD, @PD90)";
    oleDbComQC.Parameters.AddWithValue("@ACCTS", OleDbType.Integer);
    oleDbComQC.Parameters.AddWithValue("@EOB", OleDbType.Decimal);
    oleDbComQC.Parameters.AddWithValue("@FPD", OleDbType.Integer);
    oleDbComQC.Parameters.AddWithValue("@F90P", OleDbType.Integer);
    oleDbComQC.Parameters.AddWithValue("@PDC", OleDbType.Integer);
    oleDbComQC.Parameters.AddWithValue("@INC", OleDbType.Decimal);
    oleDbComQC.Parameters.AddWithValue("@PD", OleDbType.Integer);
    oleDbComQC.Parameters.AddWithValue("@PD90", OleDbType.Integer);

    oleDbComQC.Parameters["@ACCTS"].Value = iAccts;
    oleDbComQC.Parameters["@EOB"].Value = decEOB;
    oleDbComQC.Parameters["@FPD"].Value = iFPD;
    oleDbComQC.Parameters["@F90P"].Value = i90PD;
    oleDbComQC.Parameters["@PDC"].Value = iNumChks;
    oleDbComQC.Parameters["@INC"].Value = decIncome;
    oleDbComQC.Parameters["@PD"].Value = iPPD;
    oleDbComQC.Parameters["@PD90"].Value = iP90PD;

    Jude

    T 1 Reply Last reply
    0
    • T TheJudeDude

      I am receiving an Overflow error from an INSERT statement. I understand this is because a value that is assigned to a variable is larger than the data type, correct? The database was built in Access. I pinned the values on screen while debugging and took a screen shot, which is linked herewhich is linked here. I have double checked the data types and they all seem to match.What am I missing? Thank you in advance. Here is the code:

      oleDbComQC.CommandText = "INSERT INTO RANKS ([ACCOUNTS], [EOB], [FPD], [F90P], [PDCHECK], [INCOME], [PD], [PD90P]) " +
      "VALUES(@ACCTS, @EOB, @FPD, @F90P, @PDC, @INC, @PD, @PD90)";
      oleDbComQC.Parameters.AddWithValue("@ACCTS", OleDbType.Integer);
      oleDbComQC.Parameters.AddWithValue("@EOB", OleDbType.Decimal);
      oleDbComQC.Parameters.AddWithValue("@FPD", OleDbType.Integer);
      oleDbComQC.Parameters.AddWithValue("@F90P", OleDbType.Integer);
      oleDbComQC.Parameters.AddWithValue("@PDC", OleDbType.Integer);
      oleDbComQC.Parameters.AddWithValue("@INC", OleDbType.Decimal);
      oleDbComQC.Parameters.AddWithValue("@PD", OleDbType.Integer);
      oleDbComQC.Parameters.AddWithValue("@PD90", OleDbType.Integer);

      oleDbComQC.Parameters["@ACCTS"].Value = iAccts;
      oleDbComQC.Parameters["@EOB"].Value = decEOB;
      oleDbComQC.Parameters["@FPD"].Value = iFPD;
      oleDbComQC.Parameters["@F90P"].Value = i90PD;
      oleDbComQC.Parameters["@PDC"].Value = iNumChks;
      oleDbComQC.Parameters["@INC"].Value = decIncome;
      oleDbComQC.Parameters["@PD"].Value = iPPD;
      oleDbComQC.Parameters["@PD90"].Value = iP90PD;

      Jude

      T Offline
      T Offline
      TheJudeDude
      wrote on last edited by
      #2

      Solved: The data types in the data table were off.

      Jude

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups