CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2000
    Posts
    2

    Variables & SQL in VB

    Hi
    Can someone explain help me. I am using a DB2 database with VB6.0. I am trying to compare a db2 decimal value, acquired through an SQL query, to a VB variable. No matter which data type I use I get an err msg saying the data types are not compatible. I tried using the CDec function to convert my varible to a decimal value, but that did not work either. Please help Thanx JC


  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: Variables & SQL in VB

    Try using a variable type of Single or Double. Then try converting your DB2 value to either of those to compare against your VB value. (Use CSng or CDbl for the conversion.)

    Just a thought,
    John

    John Pirkey
    MCSD
    www.ShallowWaterSystems.com
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured