Click to See Complete Forum and Search --> : Variables & SQL in VB


JC24
February 7th, 2000, 11:24 AM
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

Johnny101
February 7th, 2000, 04:40 PM
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