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

  1. #1

    Default ODBC 37000 error

    :confused;
    I'm getting the following error:


    ODBC Error Code = 37000 (Syntax error or access violation)

    [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
    statement.

    SQL = "INSERT INTO Healthcare_Catalog( Program_Name, Program_Web,
    Program_Description, Provider_Name_Short, School, Location_City,
    Location_State, Program_Notes, Program_Contact, Contact_Email, Contact_Phone,
    Distance, Degree_Level, Attendance_Options, Length_of_Program,
    Length_of_Program_Years, Occupational_Information, Rural_Opportunities,
    Admission_Prerequisites, Rural, Focus_Program) VALUES ( 'testone', '', '',
    'ACNM', 35, '', '', '', '', '', '', 'Didatic Only', 'AA', 'Full Time', '< year
    (0-10 days)', , '', '', '', 'no', 'no')"

    Data Source = "AKHC"

    The error occurred while processing an element with a general identifier of
    (CFQUERY), occupying document position (3:2) to (3:37) in the template file
    D:\Inetpub\dist-web\users\sagea\health_careers\sessions\program_in sert.cfm.

    Apparently from this code:

    <cfquery datasource="#data_source#">
    INSERT INTO Healthcare_Catalog(
    Program_Name,
    Program_Web,
    Program_Description,
    Provider_Name_Short,
    School,
    Location_City,
    Location_State,
    Program_Notes,
    Program_Contact,
    Contact_Email,
    Contact_Phone,
    Distance,
    Degree_Level,
    Attendance_Options,
    Length_of_Program,
    Length_of_Program_Years,
    Occupational_Information,
    Rural_Opportunities,
    Admission_Prerequisites,
    Rural,
    Focus_Program)
    VALUES (
    '#SESSION.ProgWiz.Program_Name#',
    '#SESSION.ProgWiz.Program_Web#',
    '#SESSION.ProgWiz.Program_Description#',
    '#SESSION.ProgWiz.Provider_Name_Short#',
    #SESSION.ProgWiz.School#,

    '#SESSION.ProgWiz.Location_City#',
    '#SESSION.ProgWiz.Location_State#',
    '#SESSION.ProgWiz.Program_Notes#',
    '#SESSION.ProgWiz.Program_Contact#',
    '#SESSION.ProgWiz.Contact_Email#',
    '#SESSION.ProgWiz.Contact_Phone#',
    '#SESSION.ProgWiz.Distance#',
    '#SESSION.ProgWiz.Degree_Level#',
    '#SESSION.ProgWiz.Attendance_Options#',
    '#SESSION.ProgWiz.Length_of_Program#',
    #SESSION.ProgWiz.Length_of_Program_Years#,
    '#SESSION.ProgWiz.Occupational_Information#',
    '#SESSION.ProgWiz.Rural_Opportunities#',
    '#SESSION.ProgWiz.Admission_Prerequisites#',
    '#SESSION.ProgWiz.Rural#',
    '#SESSION.ProgWiz.Focus#')
    </cfquery>

    I'm not sure what the problem is. Can anyone help me out?

    Thanks,
    S./




    sage703 Guest

  2. Similar Questions and Discussions

    1. [microsoft][odbc microsoft access driver] syntax error (missing operator) in query expression error
      I have a query I want to run using DBQwiksite siftware, which produces the syntax error (missing operator) in query expression error when...
    2. ODBC Error?
      I've just started using Cold Fusion MX in conjunction with DW MX & Cartweaver. My problem is that when I try and create a new DSN, I am give the...
    3. ODBC Error MX 6.1
      sorry to bounce this back to the top but this issue needs to be addressed, i have spent four days on macromedia's website. this is a big problem for...
    4. ODBC has error but no error message displayed
      Hi All.. This is a strange one that I hope someone has come across. I have an asp.net application that needs to access a flat file databse via...
    5. Microsoft OLE DB Provider for ODBC Drivers error '80004005' Error
      Hi folks - i've got a windows 2000 server (SP3) i've run the IIS lockdown tool on it and set for dynamic websites - all the static pages within the...
  3. #2

    Default Re: ODBC 37000 error

    For one thing it looks like you're missing a value ...

    '< year (0-10 days)' , (missing ), '', '', '', 'no', 'no'
    mxstu Guest

  4. #3

    Default Re: ODBC 37000 error

    That happens because I don't put a value in the field for some reason (that's
    something i can fix later i think). So this time I put a numeric value in the
    field, as the database requires and yet I still got an error (very similar):

    ODBC Error Code = 22005 (Error in assignment)

    [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria
    expression.

    SQL = "INSERT INTO Healthcare_Catalog( Program_Name, Program_Web,
    Program_Description, Provider_Name_Short, School, Location_City,
    Location_State, Program_Notes, Program_Contact, Contact_Email, Contact_Phone,
    Distance, Degree_Level, Attendance_Options, Length_of_Program,
    Length_of_Program_Years, Occupational_Information, Rural_Opportunities,
    Admission_Prerequisites, Rural, Focus_Program) VALUES ( 'TESTONE', '', '',
    'ACNM', 35, '', '', '', '', '', '', 'Didatic Only', 'AA', 'Full Time', '1
    year', 1, '', '', '', 'no', 'no')"

    Data Source = "AKHC"

    There appears to be the right number of fields (21 to insert into and 21
    inserted). Also the only numeric fields (School, and Length_of_Program_Years
    are both input correctly (without the single ' marks around the variables). I
    seem to have a problem using INSERT INTO statements in general. When I use
    CFINSERT I have no problems generally, although I cannot use CFINSERT herre I
    don't think because I have multiple inserts from multiple forms (I'm using
    session variables and have a multiple page form screen leading up to this
    error).

    Thanks for your help,
    S./


    sage703 Guest

  5. #4

    Default Re: ODBC 37000 error

    Check your other thread.
    mxstu 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