We are handling a legacy code which based on Team Developer 2005.1
There is a query like
!!CB!! 70
Set sSqlCommand = '
SELECT name, value
INTO :sName, :sValue
FROM av_system_settings
WHERE name LIKE \'Company_\%\''
If NOT SqlPrepareAndExecute( hSqlMain, sSqlCommand )
Return FALSE
Loop
If SqlFetchNext( hSqlMain, nFetch )
...
Here the into variable :sName, :sValue
are Strings but it always have empty value although the record has been looped correctly through SqlFetchNext
The into variable on other place are all fine. Just not working here one place.
Have run out of brain on this... Any idea? Guys :)
If the sValue variable need to hold Long data then please have a look on SqlSetLongBindDatatype ( ) function.
Check the value of sql handle hsqlMain, if it have a postive value or one it means that handle connected properly. Otherwise if the handle value is null or zero, it means handle not connected.
Try to use SqlFetchRow ( hsqlMain, nRow, nFetch ) and increment the value of nRow by 1 till function return false or the value of nFetch becomes FETCH_EOF.
Set nRow = 0
While (TRUE)
If not SqlFetchRow( hsqlMain, nRow, nFetch )
Break
Set nRow = nRow + 1