Update to Mysql question

by "Web Alchemy Concepts" <sales(at)webalchemy.on.ca>

 Date:  Wed, 12 Mar 2003 16:08:27 -0500
 To:  <hwg-languages(at)hwg.org>
 In-Reply-To: 
  todo: View Thread, Original
I just wanted to note that I do not have this error when I use MSAccess
- it only crops up when I switch over the MySQL. I was reading on the
MySQL site that the database converts anything entered into a decimal
field to a string object - hence the type mismatch...so how do I handle
this in my asp code back to a variable?

Jeff

-----Original Message-----
From: Ed Sims [mailto:edsims(at)htcomp.net] 
Sent: March 12, 2003 1:44 PM
To: Web Alchemy Concepts
Subject: Re: Mysql question


>From what I see,........ Have you deminsioned Shipping2? Or is it used
in another part of your script?


3/12/03 12:14:04 PM, "Web Alchemy Concepts" <sales(at)webalchemy.on.ca>
wrote:

>Hello,
>
>I am having a problem with a calculation in ASP where I am using data 
>from a MySQL database. I have the fields Tax and BasePrice defined as 
>DECIMAL 9,2
>and I simply adding and multiplying some variables. My SQL select
>statement looks ok as well.
>
>
>If Request.Form("Shipping_Method") = "Selection1" then  shipping2 = 
>7.49 Else
> shipping2 = 0
>End If
>
> Payment_Total = (shipping2) +
>(rsProducts.Fields.Item("BasePrice").Value) +
>((rsProducts.Fields.Item("Tax").Value) *
>(rsProducts.Fields.Item("BasePrice").Value))
>
>Any ideas why the above line generates a Type mismatch error?
>
>Thanks in advance,
>
>Jeff P.
>
>
>
>

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA