Data Type Help How do I convert SQL Numeric/Decimal to SQL BigInt?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JimN1
    New Member
    • Dec 2006
    • 21

    Data Type Help How do I convert SQL Numeric/Decimal to SQL BigInt?

    I am reading in a SQL data type of Numeric and trying to write it out to another SQL table where the field is defined as BigInt. I am presetly putting the data into a Dim indata as String. I can see the data there but I get an error when I try to put it into the SQL field of BigInt. Is there a conversion function or what data type to I need to store it in within my VB program?
  • willakawill
    Top Contributor
    • Oct 2006
    • 1646

    #2
    Originally posted by JimN1
    I am reading in a SQL data type of Numeric and trying to write it out to another SQL table where the field is defined as BigInt. I am presetly putting the data into a Dim indata as String. I can see the data there but I get an error when I try to put it into the SQL field of BigInt. Is there a conversion function or what data type to I need to store it in within my VB program?
    Hi try CLng(indata)

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Originally posted by JimN1
      I am reading in a SQL data type of Numeric and trying to write it out to another SQL table where the field is defined as BigInt. I am presetly putting the data into a Dim indata as String. I can see the data there but I get an error when I try to put it into the SQL field of BigInt. Is there a conversion function or what data type to I need to store it in within my VB program?
      If the CLng doesn't work, then please tell us what error you are getting. Perhaps the number is too large, or BigInt doesn't like decimal points.

      Comment

      Working...