PDA

View Full Version : Sleeper: SQL ROUND function work in VBA not VB6



mohanvijay
05-05-2011, 06:26 AM
Hai All,

below code works fine with VBA but when i run in VB6 it is not working
and "Undefined function ROUND in expression"error occures
I use ADO 2.5 reference in both VBA and VB6

Why SQL ROUND only works with VBA how can i get in ROUND function in VB6

Please Help

I am using WINDOWS XP SP3
MS OFFICE 2003




qqry = "SELECT challan_user_no,challan_no,tds FROM temp_challan WHERE ROUND(tds,0)-tds<>0"
rs.Open qqry, db, adOpenStatic, adLockReadOnly
Range("a1").CopyFromRecordset rs

mohanvijay
05-05-2011, 07:21 PM
Any Help?

Bob Phillips
05-06-2011, 01:23 AM
When you say VB, do you mean from a VB6 application?

mohanvijay
05-06-2011, 07:22 PM
Yes

Bob Phillips
05-07-2011, 01:51 AM
I don't have VB6 installed at the moment, I will need to reload it and test it.