hi all
i am having application which is connecting to databset and executing
one query as below:-
string str;
str="select count(*) from table1;
and then i am using sqlcommand to get result as below:-
long l=(long)sqlcommand.ExecuteScalar();
at this line my code is giving error 'specified cast is not a valid'.
but if i am collecting result of executescalar in string then it is
working properly.
can some one tell me why this is happending.
Any help will be appreciated
thanks in advance.