db doesn't accept decimal numbers

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. #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: ...
    2. #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,...
    3. #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: ...
    4. #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...
    5. 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....
  3. #2

    Default 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

  4. #3

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139