Go4Expert

Go4Expert (http://www.go4expert.com/)
-   ASP (http://www.go4expert.com/forums/asp/)
-   -   Type mismatch error (http://www.go4expert.com/forums/type-mismatch-error-t10143/)

rag84dec 20Apr2008 14:24

Type mismatch error
 
Hi,
I am assiging a the count(*) from a database query to a variable.But it is giving this error
Code:

Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch

the query is here
Code:

sql="select count(*) from tablename where row=somevalue "
set ObjRS=cn.execute(sql)
dim variable
variable=ObjRS(0)

if variable <> 0 then 'Here i am getting an error mentioned 'above
end if


dotnetexpert 16May2008 17:26

Re: Type mismatch error
 
try below mentione query. cheers..

" select isnull(count(1),0) from tablename where row=somevalue "


All times are GMT +5.5. The time now is 10:28.