List:General Discussion« Previous MessageNext Message »
From:Critters Date:June 19 2007 12:37pm
Subject:Re: Type Mismatch
View as plain text  
Thanks for responding.
If I just response.write score I get 6.5714
I got it working by doing this: cast(sum_score/sum_votes as signed) AS 
'score'
Which returns 7. So it is a MySQL error? I would prefer to do the 
rounding in ASP and not have to update other scripts giving the same 
problems.
--
Dave


J.R. Bullington wrote:
> This is an ASP error, not a MySQL error.
>
> However, try doing a 
>
> response.write rs("Score")
> response.flush
>
> Then you will see why you are getting the mismatch error. It is probably the fact
> that rs("Score") is not returning an integer or number of any kind (i.e. if rs("score") is
> null).
>
> HTH!
>
> ----------------------------------------
> From: Critters <critters@stripped>
> Sent: Tuesday, June 19, 2007 7:44 AM
> To: MySQL General <mysql@stripped>
> Subject: Type Mismatch 
>
> Hi,
> I hope someone can help me with my problem, something that has come up 
> when moving code and DB to a new server:
>
> Connection:
> driver={MySQL ODBC 3.51 
>
> DRIVER};server=localhost;uid=xxxxxxxxxx;pwd=xxxxxxxxxx;database=xxxxxxxxxx;option=16387
>
> SQL:
> SELECT (sum_score/sum_votes) AS 'score' FROM xxxxxxxxxx WHERE id = 
> xxxxxxxxxx
>
> Value of "score":
> 6.2153
>
> ASP:
> <%=int(RS("score")*25)-20%>
>
> Error:
> Microsoft VBScript runtime (0x800A000D)
> Type mismatch
>
> Any help appreciated, I did not have this problem when I had the same 
> set-up but on a server running an earlier version of MySQL and the ODBC 
> driver.
> --
> David Scott
>
>   
Thread
Type MismatchCritters19 Jun
  • Re: Type MismatchIan19 Jun
re: Type MismatchJ.R. Bullington19 Jun
  • Re: Type MismatchCritters19 Jun
Re: Type MismatchJ.R. Bullington19 Jun