erro shows:<br>ODBC Error Code = 22012 (Division by zero)<br>[Microsoft][ODBC Microsoft Access 97 Driver]Division by zero (null)<br><br>who can tell me what's wrong with database?<br>
hmmm... I couldn't really say without looking at the code that is trying to access the db, but it looks like you are trying to divide something by zero (computers freak out when you try to do that)...<br><br>Maybe you have a CFQUERY that is something like:<br><br>select sum = column1/column2 from producttable<br><br>???
just figured it out.<br>yes. column2 has 0.<br>i delete column1/column2 from query<br>and add <cfoutput query...><cfif column2 is "0">bla bla bla</cfif><CFIF column2 is NOT "0">bla bla bla</cfif><br><br>now everything is fine<br>thanks
A cleaner method may be:<br><FONT FACE=monospace><b><br><cfif column2><!--- will return true if any number other than zero ---><br> <cfset x=column1/column2><br> <cfoutput>#x#</cfoutput><br><cfelse><br> Division by zero not allowed<br></cfif><br></b></font><br>This way, CF doesn't have to parse (and execute) two CFIFs (just a suggestion)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.