Ask a Question related to Coldfusion Database Access, Design and Development.
-
skydiver_jim #1
db doesn't accept decimal numbers
I have an access databse, the connection is fine. I have a series of elements
in my insert statement that I generate: last name, first name, address, etc.
and all that goes into the database ok. but I have two fields: latitude and
longitude that bombs out the insert statement, and I can't figure out why.
I've tried altering acess in design mode with decimal, number, integer, long
integer, nothing works! Can anyone shed some light on this? Thanks.
This is the processing page:
<cflock scope="Session" type="ReadOnly" timeout="30" throwontimeout="no">
<cfset
MM_Username=Iif(IsDefined("Session.MM_Username")," Session.MM_Username",DE(""))>
<cfset
MM_UserAuthorization=Iif(IsDefined("Session.MM_Use rAuthorization"),"Session.MM_U
serAuthorization",DE(""))>
</cflock>
<cfif MM_Username EQ "" OR MM_UserAuthorization EQ "" OR
ListFind("Administrator",MM_UserAuthorization) EQ 0>
<cfset MM_referer=CGI.SCRIPT_NAME>
<cfif CGI.QUERY_STRING NEQ "">
<cfset MM_referer=MM_referer & "?" & CGI.QUERY_STRING>
</cfif>
<cfset MM_failureURL="myErrorFile.cfm?accessdenied=" &
URLEncodedFormat(MM_referer)>
<cflocation url="#MM_failureURL#" addtoken="no">
</cfif>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<CFINSERT DATASOURCE="fco_red_cross" dbtype="ODBC" TABLENAME="fco_contact">
<link href="css/Chesapeake.css" rel="stylesheet" type="text/css">
<body bgcolor="#66CCFF">
<h2>Thanks! your data has been inserted. </h2>
<p> <CFOUTPUT> The data you entered was: </p>
<p>
CHERS ID: #Form.CHERS_ID#<BR>
First Name: #Form.F_Name#<BR>
Last Name: #Form.L_Name#<BR>
Address: #Form.Addr#<BR>
City: #Form.City#<BR>
State: #Form.State#<BR>
Zip: #Form.Postal_Code#<BR>
Home Telephone: #Form.Home_phone#<BR>
Work Telephone: #Form.Work_phone#<BR>
Cell Telephone: #Form.Cell_phone#<BR>
ARC Phone: #Form.ARC_phone#<BR>
Direct Connect: #Form.Direct_connect#<BR>
Primary Email: #Form.Pri_Email#<BR>
Secondary Email: #Form.Sec_Email#<BR>
DAT Status: #Form.DAT_Status#<BR>
Function: #Form.Funct#<BR>
Coverage:#Form.Cover#<br>
Notes:#Form.Notes#<br>
Latitude:#Form.Lat#<br>
Longitude:#Form.Long#<br>
skydiver_jim Guest
-
#26314 [Opn->Bgs]: Decimal numbers starting with 0 always treated as octals, even when invalid
ID: 26314 Updated by: derick@php.net Reported By: matteo at beccati dot com -Status: Open +Status: ... -
#26314 [Bgs->Opn]: Decimal numbers starting with 0 always treated as octals, even when invalid
ID: 26314 User updated by: matteo at beccati dot com -Summary: Decimal numbers starting with 0 wrongly treated as octals,... -
#26314 [Opn->Bgs]: Decimal numbers starting with 0 wrongly treated as octals, even when invalid
ID: 26314 Updated by: derick@php.net Reported By: matteo at beccati dot com -Status: Open +Status: ... -
#26314 [NEW]: Decimal numbers starting with 0 wrongly treated as octals, even when invalid
From: matteo at beccati dot com Operating system: Debian GNU/Linux 3.0 PHP version: 4.3.4 PHP Bug Type: Scripting Engine... -
Changes won't accept.
We had some sort of corruption on our XP computer. Now, when we change a setting, it doesn't stick. The setting goes back to the original state.... -
mxstu #2
Re: db doesn't accept decimal numbers
Originally posted by: skydiver_jim
I have two fields: latitude and longitude that bombs out the insert
statement, and I can't figure out why.
It is probably that you are using "Long" as a field name. "Long" is a type of
number and is reserved word. Change the column name to something else like
"Longitude" and the insert should work fine.
For future reference, posting the complete error message (including the sql
statement) makes it easier for people to help you diagnose the problem :-)
mxstu Guest
-
skydiver_jim #3
Re: db doesn't accept decimal numbers
Duh, do I feel stupid. Thanks! I appreciate you helping out. And I'll post more info the next time.
Cheers,
Jim
skydiver_jim Guest



Reply With Quote

