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 <[EMAIL PROTECTED]>
Sent: Tuesday, June 19, 2007 7:44 AM
To: MySQL General <mysql@lists.mysql.com>
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
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]