Type Mismatch

2007-06-19 Thread Critters

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=xx;pwd=xx;database=xx;option=16387


SQL:
SELECT (sum_score/sum_votes) AS 'score' FROM xx WHERE id = 
xx


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]



re: Type Mismatch

2007-06-19 Thread J.R. Bullington
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=xx;pwd=xx;database=xx;option=16387

SQL:
SELECT (sum_score/sum_votes) AS 'score' FROM xx WHERE id = 
xx

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]




Re: Type Mismatch

2007-06-19 Thread Critters

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=xx;pwd=xx;database=xx;option=16387


SQL:
SELECT (sum_score/sum_votes) AS 'score' FROM xx WHERE id = 
xx


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]



Re: Type Mismatch

2007-06-19 Thread Ian
On 19 Jun 2007 at 12:42, Critters wrote:

 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=xx;pwd=xx;database=xx;option=16387
 
 SQL:
 SELECT (sum_score/sum_votes) AS 'score' FROM xx WHERE id = 
 xx
 
 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.

Hi,

I had a similar problem when using select count(*) on windows.  The MyODBC 
driver is 
not returning a number type, so the code fails because it is expecting one.

To confirm this add this code:

%=Typename( RS(score).value) %

above the line that fails to show what type the MyODBC driver is returning.  
When it failed 
for me I was getting 'unknown' instead of 'Long'.

If this is the case you may have to specifically CAST it into a number type in 
your SQL 
statement or use one of the VBScript functions CInt(), CLng(), CDbl(), CSng() 
etc.
Hope this helps

Ian
-- 





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Type Mismatch

2007-06-19 Thread J.R. Bullington

It's not an error. MySQL Cast will do the 'rounding' for you. 
The acutal case is that the 64-bit integer floating value is not affected by 
the CAST.

See the manual page for CAST: 
http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html

If you would prefer to do the rounding in ASP, push the result into a temporary 
variable, then do a CDbl on the variable. Yes, it's a slightly extra step, but 
it will ensure that your data stays in the correct format.

J.R.



From: Critters [EMAIL PROTECTED]
Sent: Tuesday, June 19, 2007 8:37 AM
To: [EMAIL PROTECTED]
Subject: Re: Type Mismatch 

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 
 Sent: Tuesday, June 19, 2007 7:44 AM
 To: MySQL General 
 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=xx;pwd=xx;database=xx;option=16387

 SQL:
 SELECT (sum_score/sum_votes) AS 'score' FROM xx WHERE id = 
 xx

 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

   




Error 1064: type mismatch

2004-12-15 Thread Nicolás Conde
   Hello list.
   I'm new to MySQL but so far I like it a lot. I have it running on 
WinNT4 w/SP6a and I use MySQL Admin.
   I'm having trouble running an application from a third party, this 
application launches but whenever I try a query, I get a message that 
says Type mismatch for field field name here, expecting:AuntoInc
actual: Unknown.
   We've checked (the developer and I) the table definition and the 
referred field is an integer with autoinc on, and so it's shown in MySQL 
Admin.
   ¿Any ideas? I've googled for an answer but couldn't find it, also 
red the mysql manual but that didn't do either.
   Thanks a lot in advance.-

--
-=   Nicolás Conde - SS.AA.=-
-=   Facultad de Ingeniería=-
-= Universidad de la República =-
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Type mismatch (Error 13)

2002-03-29 Thread oliverjd

Hello  all,

Greetings from Scotland.

Can anyone help?

I have and Access 2000 Database. On MS windows 98.

I inserted the access to mysql text

I created the Module and inserted the , and I tried to run the macro.
Action - RunCode  and
Function Name - export_mysql ()  I also tried export_mysql().  But each time
I run the Macro I get an error message.


In the Visual Basic window the following part of the code type is
highlighted in yellow it is part of the section Check Primary property.

 For Each fld In idx.Fields

Type mismatch (Error 13)

 'Check Primary property

   k = k + 1

If idx.PRIMARY Then
istuff =  PRIMARY KEY (
Else
istuff =  KEY (
End If

f = 0

For Each fld In idx.Fields
f = f + 1
iname = fld.Name

For j = 1 To Len(iname)

If j  Len(iname) Then

If Mid$(iname, j, 1) =   Then


s = Left$(iname, j - 1)
s = sRight$(iname, Len(iname) - j)
j = j + 1
found = True
iname = s

End If

Does anyone know what I have done wrong, and what I need to do to correct
it?

Thanks,

James Oliver




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Type Mismatch issue when Deleting from table

2001-07-06 Thread Dave Carter

Platform: W2k/Advanced Server
DB: mySQL 3.23.33
Language: ASP/VBScript

Issue: I'm creating a backend administration program that will allow
updates, deletes, additions, etc. All is well expect for in one table in
particular when I choose to delete a record it gives me a type mismatch
Error. I've written this code before on other pages without trouble, but
this one table in particular is causing trouble. Here is the SQL statement
on the ASP page:

DELETE FROM tbl_headline WHERE head_id =  + Replace(deleteheadline, ',
'') + 

Now head_id is an Integer, and so is deleteheadline, but it gives me a type
mismatch error everytime. I've even modded the code in several ways trying
to get around it, like instead of matching the head_id I will match up the
headline_name field with the same results or making it a text string by
putting apostrophe's in etc.. I know the deleteheadline variable has a
numerical value because I response.write the variable before the error
occurs. Any help you be greatly appreciated.


Thanks,
Dave Carter
Chief Web Architect
Accelerated Business Technologies, Inc.
http://www.abti.cc
717.464.2970


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Type Mismatch issue when Deleting from table

2001-07-06 Thread karel pitra

why do you use Replace if deleteheadline is an integer?


On Fri  6. July 2001 14:26, you wrote:
 Platform: W2k/Advanced Server
 DB: mySQL 3.23.33
 Language: ASP/VBScript

 Issue: I'm creating a backend administration program that will allow
 updates, deletes, additions, etc. All is well expect for in one table in
 particular when I choose to delete a record it gives me a type mismatch
 Error. I've written this code before on other pages without trouble, but
 this one table in particular is causing trouble. Here is the SQL statement
 on the ASP page:

 DELETE FROM tbl_headline WHERE head_id =  + Replace(deleteheadline, ',
 '') + 

 Now head_id is an Integer, and so is deleteheadline, but it gives me a type
 mismatch error everytime. I've even modded the code in several ways trying
 to get around it, like instead of matching the head_id I will match up the
 headline_name field with the same results or making it a text string by
 putting apostrophe's in etc.. I know the deleteheadline variable has a
 numerical value because I response.write the variable before the error
 occurs. Any help you be greatly appreciated.


 Thanks,
 Dave Carter
 Chief Web Architect
 Accelerated Business Technologies, Inc.
 http://www.abti.cc
 717.464.2970


 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php