cast to int or use fetchrowset