Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cold Fusion Error/Access Error - "Invalid precision value"

Status
Not open for further replies.

tgilbreath

Programmer
Mar 11, 2003
10
US
Hi guys-

Doing a standard update, but on multiple tables....everytime the update code is ran, I get this error:

------------------
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver]Invalid precision value
------------------


I can't find anything concrete on the net about it, can someone please tell me what I'm doing wrong? Code below:



Edit Page Code:
----------------------------------
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>
<!-- saved from url=(0054) -->
<HTML><HEAD><TITLE>Houston Energy Credit Union</TITLE>
<META
content=&quot;Houston Energy Credit Union - the credit union's mission is to respond to our membership's financial needs by providing sound, competitive financial products while ensuring credit union services for future generations.&quot;
name=description>
<META
content=&quot;houston, energy, HECU, texas, tx, credit, union, CU, car, truck, NCUA, CUNA, money, loan, credit card, atm, branch, deposit, withdrawal, service, member, membership, cu@home, account, credit union, financial, financing, members, services, check, checking, savings, accounts, retire, retirement, 401K, annuity, home, house, mortgage, mortgages, loans, lending, bank, banking, downtown, IRA, money market, investment, investments, investing, certificate, deposits, rate, rates&quot;
name=keywords>
<META content=&quot;60 Days&quot; name=revisit-after>
<META content=&quot;Business Banking&quot; name=classification>
<META content=ALL name=robots>
<META content=GLOBAL name=distribution>
<META content=GENERAL name=rating>
<META content=en-us name=language>
<META http-equiv=reply-to content=info@houstonenergycu.org>
<META http-equiv=Content-Type content=&quot;text/html; charset=iso-8859-1&quot;><LINK
href=&quot; type=text/css rel=STYLESHEET>
<META content=&quot;MSHTML 6.00.2800.1264&quot; name=GENERATOR></HEAD>
<cfquery name=&quot;EffectiveDateOutput&quot; datasource=&quot;ratesserver&quot;>
SELECT * FROM HECUEffectiveDate
</cfquery>
<cfquery name=&quot;SavingsRatesOutput&quot; datasource=&quot;ratesserver&quot;>
SELECT * FROM HECUSavingsRates
</cfquery>
<cfquery name=&quot;MoneyMarketOutput&quot; datasource=&quot;ratesserver&quot;>
SELECT * FROM HECUMoneyMarket
</cfquery>
<cfquery name=&quot;TermShareTextOutput&quot; datasource=&quot;ratesserver&quot;>
SELECT * FROM HECUTermShareText
</cfquery>
<cfquery name=&quot;TermShareOutput&quot; datasource=&quot;ratesserver&quot;>
SELECT * FROM HECUTermShare
</cfquery>
<cfquery name=&quot;TermShareDisclaimerOutput&quot; datasource=&quot;ratesserver&quot;>
SELECT * FROM HECUTermShareDisclaimers
</cfquery>
<BODY leftMargin=0 background= topMargin=0 marginwidth=&quot;0&quot;
marginheight=&quot;0&quot;>
<SCRIPT type=text/javascript>

//HV Menu- by Ger Versluis (//Submitted to Dynamic Drive (//Visit for this script and more

function Go(){return}

</SCRIPT>

<SCRIPT src=&quot; type=text/javascript></SCRIPT>

<SCRIPT src=&quot; type=text/javascript></SCRIPT>
<NOSCRIPT>Your browser does not support script</NOSCRIPT>
<TABLE height=&quot;100%&quot; cellSpacing=0 cellPadding=0 width=&quot;100%&quot;>
<TBODY>
<TR>
<TD vAlign=top>
<TABLE height=&quot;100%&quot; cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top width=150>
<TABLE height=&quot;100%&quot; cellSpacing=0 cellPadding=0 width=150
border=0><TBODY>
<TR>
<TD vAlign=top bgColor=#333388 height=84><IMG height=84 alt=&quot;&quot;
src=&quot; width=150 border=0> </TD></TR>
<TR>
<TD vAlign=top bgColor=#ffcc00 height=30><A
href=&quot; height=30 alt=&quot;&quot; src=&quot; width=150
border=0></A></TD></TR>
<TR>
<TD vAlign=top align=left bgColor=#cc0000><!-- <img src=&quot;images/special.gif&quot; width=&quot;200&quot; height=&quot;49&quot; alt=&quot;&quot; border=&quot;0&quot;> --><BR>
<P><SPAN class=yellow14>Rates</SPAN></P>
<UL>
<LI><SPAN class=blackbold10>Savings Rates</SPAN>
<LI><A
href=&quot; class=white10>Loan Rates</SPAN></A>
</LI></UL></TD></TR></TBODY></TABLE></TD>
<TD vAlign=top width=610>
<TABLE cellSpacing=0 cellPadding=0 width=610 border=0>
<TBODY>
<TR>
<TD vAlign=top height=22>
<DIV id=MenuPos
style=&quot;WIDTH: 87px; POSITION: relative; HEIGHT: 19px&quot;><IMG
height=19 src=&quot; width=1></DIV></TD></TR>
<TR>
<TD vAlign=top>
<TABLE cellSpacing=0 cellPadding=0 width=610 bgColor=#ffffff
border=0>
<TBODY>
<TR>
<TD width=463><BR><IMG height=71 alt=&quot;&quot;
src=&quot; width=318
border=0></TD>
<TD vAlign=top width=147><A
href=&quot; target=new><IMG height=31 alt=&quot;&quot;
src=&quot; width=147
border=0></A></TD></TR>
<form action=&quot;rates_update.cfm&quot; method=&quot;post&quot;>
<TR>
<cfoutput query=&quot;EffectiveDateOutput&quot;>
<TD vAlign=top align=middle width=463 height=215><BR>
<P align=center><B><input type=&quot;text&quot; name=&quot;EffectiveDate&quot; size=&quot;40&quot; value=&quot;#EffectiveDate#&quot;></B></P>
</cfoutput>
<TABLE cellSpacing=0 cellPadding=5 width=375 border=0>
<TBODY>
<TR>
<TD align=middle colSpan=3><SPAN
class=bluebold14>Savings Account
Rates</SPAN></TD></TR>
<TR>
<TD align=middle width=225 bgColor=#ffcc66><SPAN
class=black11><B>Type of Account</B></SPAN></TD>
<TD align=middle width=75 bgColor=#ffcc66><SPAN
class=black11><B>APR</B></SPAN></TD>
<TD align=middle width=75 bgColor=#ffcc66><SPAN
class=black11><B>APY</B></SPAN></TD></TR>
<cfoutput query=&quot;SavingsRatesOutput&quot;>
<TR>
<TD width=225><SPAN class=black11><B>
<input type=&quot;text&quot; size=&quot;25&quot; name=&quot;AccountType&quot; value=&quot;#AccountType#&quot;></B></SPAN></TD>
<TD align=middle width=75><SPAN
class=black11>
<input type=&quot;text&quot; size=&quot;3&quot; name=&quot;APR&quot; value=&quot;#APR# &quot;>%</SPAN></TD>
<TD align=middle width=75><SPAN
class=black11>
<input type=&quot;text&quot; size=&quot;3&quot; name=&quot;APY&quot; value=&quot;#APY# &quot;>%</SPAN></TD></TR>
</cfoutput>
</TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=5 width=460 border=0>
<TBODY>
<TR>
<TD align=middle colSpan=5><SPAN
class=bluebold14>Money Market</SPAN></TD></TR>
<TR>
<TD align=middle width=160 bgColor=#ffcc66><SPAN
class=black11><B>Balance Tiers</B></SPAN></TD>
<TD align=middle width=75 bgColor=#ffcc66><SPAN
class=black11><B>Energy Elite<BR>APR</B></SPAN></TD>
<TD align=middle width=75 bgColor=#ffcc66><SPAN
class=black11><B>Energy Elite<BR>APY</B></SPAN></TD>
<TD align=middle width=75 bgColor=#ffcc66><SPAN
class=black11><B>IRA<BR>APR</B></SPAN></TD>
<TD align=middle width=75 bgColor=#ffcc66><SPAN
class=black11><B>IRA<BR>APY</B></SPAN></TD></TR>
<cfoutput query=&quot;MoneyMarketOutput&quot;>
<TR>
<TD width=160><SPAN
class=black11><B>
<input type=&quot;text&quot; size=&quot;25&quot; name=&quot;BalanceTier&quot; value=&quot;#BalanceTier#&quot;>
</B></SPAN></TD>
<TD align=middle width=75><SPAN
class=black11>
<input type=&quot;text&quot; size=&quot;3&quot; name=&quot;EliteAPR&quot; value=&quot;#EliteAPR# &quot;>%</SPAN></TD>
<TD align=middle width=75><SPAN
class=black11>
<input type=&quot;text&quot; size=&quot;3&quot; name=&quot;EliteAPY&quot; value=&quot;#EliteAPY# &quot;>%</SPAN></TD>
<TD align=middle width=75><SPAN
class=black11>
<input type=&quot;text&quot; size=&quot;3&quot; name=&quot;IRAAPR&quot; value=&quot;#IRAAPR# &quot;>%</SPAN></TD>
<TD align=middle width=75><SPAN
class=black11>
<input type=&quot;text&quot; size=&quot;3&quot; name=&quot;IRAAPY&quot; value=&quot;#IRAAPY# &quot;>%</SPAN></TD></TR>
</cfoutput>
</TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=5 width=375 border=0>
<TBODY>
<TR>
<TD align=middle colSpan=3><SPAN
class=bluebold14>Term Share
Certificates</SPAN><BR><SPAN
class=black11><cfoutput query=&quot;TermShareTextOutput&quot;>
<input type=&quot;text&quot; name=&quot;TextLine1&quot; size=&quot;60&quot; value=&quot;#TextLine1#&quot;><br>
<input type=&quot;text&quot; name=&quot;TextLine2&quot; size=&quot;60&quot; value=&quot;#TextLine2#&quot;><br>
<input type=&quot;text&quot; name=&quot;TextLine3&quot; size=&quot;60&quot; value=&quot;#TextLine3#&quot;>
</cfoutput></SPAN></TD></TR>
<TR>
<TD align=middle width=125 bgColor=#ffcc66><SPAN
class=black11><B>Term</B></SPAN></TD>
<TD align=middle width=125 bgColor=#ffcc66><SPAN
class=black11><B>APR</B></SPAN></TD>
<TD align=middle width=125 bgColor=#ffcc66><SPAN
class=black11><B>APY</B></SPAN></TD></TR>
<cfoutput query=&quot;TermShareOutput&quot;>
<TR>
<TD width=125><SPAN class=black11><B>
<input type=&quot;text&quot; size=&quot;25&quot; name=&quot;Term&quot; value=&quot;#Term#&quot;></B>
<cfif Minimum IS &quot;&quot;>
<cfelse><br>
<input type=&quot;text&quot; size=&quot;25&quot; name=&quot;Minimum&quot; value=&quot;#Minimum#&quot;> Minimum
</cfif>
</SPAN></TD>
<TD align=middle width=125 valign=&quot;top&quot;><SPAN
class=black11><input type=&quot;text&quot; size=&quot;3&quot; name=&quot;APR&quot; value=&quot;#APR# &quot;> %</SPAN></TD>
<TD align=middle width=125 valign=&quot;top&quot;><SPAN
class=black11><input type=&quot;text&quot; size=&quot;3&quot; name=&quot;APY&quot; value=&quot;#APY# &quot;> %</SPAN></TD></TR>
</cfoutput>
<TR>
<TD colSpan=3><SPAN class=black9><I>
<cfoutput query=&quot;TermShareDisclaimerOutput&quot;>
<textarea name=&quot;TextLine1&quot; rows=&quot;3&quot; cols=&quot;45&quot;>#TextLine1#</textarea><br>
<textarea name=&quot;TextLine2&quot; rows=&quot;3&quot; cols=&quot;45&quot;>#TextLine2#</textarea><br>
<textarea name=&quot;TextLine3&quot; rows=&quot;3&quot; cols=&quot;45&quot;>#TextLine3#</textarea>
</cfoutput>
</I></SPAN></TD></TR></TBODY></TABLE>
<P align=left>
<input type=&quot;submit&quot; value=&quot;Update Rates&quot;>
<form></TD>
<TD vAlign=top align=middle width=147>
<TABLE cellSpacing=0 cellPadding=0 width=101 border=0>
<TBODY>
<TR>
<TD width=1 bgColor=#ffcc00><IMG height=1 alt=&quot;&quot;
src=&quot; width=1
border=0></TD>
<TD width=100><IMG height=175 alt=&quot;&quot;
src=&quot; width=100
useMap=#newnew border=0></TD></TR></TBODY></TABLE><AREA
shape=RECT alt=&quot;&quot; coords=15,16,89,37
href=&quot; shape=RECT target=checks alt=&quot;&quot; coords=18,41,88,65
href=&quot; shape=RECT alt=&quot;&quot; coords=16,68,90,88
href=&quot; <TR>
<TD align=middle colSpan=2><BR><SPAN class=black10>©
Houston Energy Credit Union<BR><A
href=&quot; Statement</A></SPAN><BR><BR>
<P align=center><IMG height=54 alt=&quot;&quot;
src=&quot; width=46
border=0>&nbsp;&nbsp;&nbsp;<IMG height=72 alt=&quot;&quot;
src=&quot; width=102
border=0></P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><MAP
name=newnew><AREA shape=RECT alt=&quot;Apply for a Loan Online&quot; coords=2,8,75,30
href=&quot; shape=RECT
alt=&quot;Re-order Checks Directly from Clarke American Online&quot; coords=2,30,96,49
href=&quot; shape=RECT
alt=&quot;Contact Us&quot; coords=3,50,84,69
href=&quot; shape=RECT
alt=&quot;Credit Cardholder Services&quot; coords=1,71,100,89
href=&quot; shape=RECT
alt=&quot;CU Friendly ATM Network&quot; coords=3,93,83,120
href=&quot; shape=RECT
alt=&quot;Select ATM Network&quot; coords=4,122,84,145
href=&quot; shape=RECT
alt=&quot;CU Members Mortgage&quot; coords=4,150,84,175
href=&quot;----------------------------------------







Update Code
----------------------------------------
<cfupdate datasource=&quot;ratesserver&quot; tablename=&quot;HECUEffectiveDate&quot; dbtype=&quot;ODBC&quot; formfields=&quot;DateID, EffectiveDate&quot;>

<cfupdate datasource=&quot;ratesserver&quot; tablename=&quot;HECUSavingsRates&quot; dbtype=&quot;ODBC&quot; formfields=&quot;RateID, AccountType, APR, APY&quot;>

<cfupdate datasource=&quot;ratesserver&quot; tablename=&quot;HECUMoneyMarket&quot; dbtype=&quot;ODBC&quot; formfields=&quot;RateID, BalanceTier, EliteAPR, EliteAPY, IRAAPR, IRAAPY&quot;>

<cfupdate datasource=&quot;ratesserver&quot; tablename=&quot;HECUTermShareText&quot; dbtype=&quot;ODBC&quot; formfields=&quot;TextID, TextLine1, TextLine2, TextLine3&quot;>

<cfupdate datasource=&quot;ratesserver&quot; tablename=&quot;HECUTermShare&quot; dbtype=&quot;ODBC&quot; formfields=&quot;RateID, Term, Minimum, APR, APY&quot;>

<cfupdate datasource=&quot;ratesserver&quot; tablename=&quot;HECUTermShareDisclaimers&quot; dbtype=&quot;ODBC&quot; formfields=&quot;TextID, TextLine1, TextLine2, TextLine3&quot;>

<cflocation url=&quot;rates.cfm&quot;>
-----------------------------------------------------




Thanks in advance!!

Tim
 
OK,
1) Don't use SELECT * unless you really need to return every value. Specify the items you need to select.

2) Most likely, the problem is going to be with cfupdate itself, and nothing wrong with your code. Both the cfupdate and cfinsert are considered somewhat unstable and it is HIGHLY recommended (by Macromedia and most CF developers) that the actual SQL statements be used for updates and inserts. With cfupdate and cfinsert, the applications may work great for a while, then they break for no reason, and the next day they may be working again. This has literally happened to me before with both cfupdate and cfinsert. Try using the SQL update instead of the cfupdate.

Hope This Helps!

Ecobb
- I hate computers!
 
I KNEW someone was going to say do it in pure SQL....I didn't think it would cause a problem like that though! But I will definitely give it a try, thanks for the input!!

 
Ok, now I'm using the SQL update...my updates are looking like this:

<code>
<cfquery name=&quot;UpdateTable1&quot; datasource=&quot;ratesserver&quot;>
UPDATE HECUEffectiveDate
SET EffectiveDate='#form.EffectiveDate#'
</cfquery>

<cfquery name=&quot;UpdateTable2&quot; datasource=&quot;ratesserver&quot;>
UPDATE HECUSavingsRates
SET AccountType='#form.AccountType#',
APR='#APR#',
APY='#APY#'
</cfquery>
</code>



STILL getting the same error:





------------------------------
Error Occurred While Processing Request
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver]Invalid precision value


Please try the following:
Enable Robust Exception Information to provide greater detail about the source of errors. In the Administrator, click Debugging & Logging > Debugging Settings, and select the Robust Exception Information option.
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.


Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Remote Address 66.140.4.249
Referrer Date/Time 07-Nov-03 08:54 AM
-------------------------------------------------
 
Can you determine which update is giving the error? You may want to comment them all out and then add them back one at the time until you find the (first) one that's causing the problem. You may want to try checking the datatypes you're passing and make sure they are correct, look for quotes where they shouldn't be, missing quotes where they should be, etc...

BTW, I'm not sure if this is what you're trying to do or not, but your current update statements will update EVERY record in the database unless you specify a WHERE clause.

Hope This Helps!

Ecobb
- I hate computers!
 
Thank you, I forgot about my WHERE statements....but I've entered them, and now I'm getting this error:

---------------
Error Occurred While Processing Request
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.

---------------------
Here is my edit code example (for sending the ID value)...is this right?

-------------------------
<cfoutput query=&quot;SavingsRatesOutput&quot;>
<TR>
<input type=&quot;hidden&quot; name=&quot;RateID&quot; value=&quot;#RateID#&quot;>
<TD width=225><SPAN class=black11><B>
<input type=&quot;text&quot; size=&quot;25&quot; name=&quot;AccountType&quot; value=&quot;#AccountType#&quot;></B></SPAN></TD>
<TD align=middle width=75><SPAN class=black11>
<input type=&quot;text&quot; size=&quot;3&quot; name=&quot;APR&quot; value=&quot;#APR# &quot;>%</SPAN></TD>
<TD align=middle width=75><SPAN class=black11>
<input type=&quot;text&quot; size=&quot;3&quot; name=&quot;APY&quot; value=&quot;#APY# &quot;>%</SPAN></TD></TR> </cfoutput>
-----------------------------------

And then here is the accompanying UPDATE code...


------------------------------
<cfquery name=&quot;UpdateTable2&quot; datasource=&quot;ratesserver&quot;>
UPDATE HECUSavingsRates
SET AccountType='#form.AccountType#',
APR='#form.APR#',
APY='#form.APY#',
WHERE RateID='#form.RateID#',
</cfquery>
-------------------------------


Why am I getting a SQL update error? UGH.
Thanks in advance!!
 
Don't put qoutes around numeric values (or at least for numeric datatypes). WHERE RateID='#form.RateID#' should probably be WHERE RateID=#form.RateID#

Hope This Helps!

Ecobb
- I hate computers!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top