The code below is an extract of ActivexScript within DTS where the values match but does not return the expected result.
------------------------------------------------------------
SqlCommand3 = "Select 'countRec'= count(*) from Tab1 where SysKey = "&" ' " & SystemKeyVal &" ' "
set Flds3 = myRecordset3.Fields
myRecordset3.Open SqlCommand3, myConn3
SET iCountREC = Flds3("countRec")
------------------------------------------------------------
It is translated as follows :
Select 'countRec' = count (*) from Tab1 where Syskey = 'NNAA'
iCountREC returns 0 records.
However, when I run the same code with Query Analyzer, I do get the expected result which is 1.
Anyhelp would be greatly appreciated.
Thanks
Ton.
------------------------------------------------------------
SqlCommand3 = "Select 'countRec'= count(*) from Tab1 where SysKey = "&" ' " & SystemKeyVal &" ' "
set Flds3 = myRecordset3.Fields
myRecordset3.Open SqlCommand3, myConn3
SET iCountREC = Flds3("countRec")
------------------------------------------------------------
It is translated as follows :
Select 'countRec' = count (*) from Tab1 where Syskey = 'NNAA'
iCountREC returns 0 records.
However, when I run the same code with Query Analyzer, I do get the expected result which is 1.
Anyhelp would be greatly appreciated.
Thanks
Ton.