Error in insert Data into MySQL 5.0.18

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

  1. #1

    Default Error in insert Data into MySQL 5.0.18

    I have not idea y got syntax error in my code..

    Can anyone help.....

    B4 this i am using MS access to build the database.....later i migrate them to
    MySQL5..
    now i got this error......but the code looks alright for me...

    Anyone can point out the error....

    Thank you

    Error Executing Database Query.
    You have an error in your SQL syntax; check the manual that corresponds to
    your MySQL server version for the right syntax to use near ',3,1,'Degree in
    Physics, Material Science, Maths Min 2 years experience in Inte' at line 2

    The error occurred in D:\Dave\web\jobs\userAdvertisementNewAds_action.cf m:
    line 55

    53 : <cfquery name="insertNewads" datasource="db">
    54 : insert into
    jdb.jobadtbl(jobadCOMPANYname,jobadPOSITIONtitle,j obadPOSITIONlevel,jobadJOBspec
    ialization,jobadINDUSTRY,jobadEMPLOYMENTtype,jobad YEARSofEXPERIENCE,jobadYEARSin
    Field,jobadCURRENCY,jobadMinMONTHLYsalary,jobadMax MONTHLYsalary,jobadLOCATION,jo
    badEducationLevel,jobadWORKauthorization,jobadAGEm in,jobadAGEmax,jobadGENDER,job
    adNOofVACANCIES,jobadPOSITIONrequirement,jobadPOSr esponsibilities,joadFOOTER,job
    adDEADLINE,jobadRepostDuration,jobadPOSLOCATION,jo badRECEIVEresume,jobadEMAILres
    ume,jobadOwner,jobadRepostDate,jobadActiveFlag)
    55 :
    values('#form.jobadCOMPANYname#','#form.jobadPOSIT IONtitle#',#form.jobadPOSITION
    level#,#form.jobadJOBspecialization#,#form.jobadIN DUSTRY#,'#form.jobadEMPLOYMENT
    type#',#form.jobadYEARSofEXPERIENCE#,#form.jobadYE ARSinField#,'#form.jobadCURREN
    CY#','#form.jobadMinMONTHLYsalary#','#form.jobadMa xMONTHLYsalary#','#form.jobadL
    OCATION#','#form.jobadEducationLevel#','#form.joba dWORKauthorization#',#form.job
    adAGEmin#,#form.jobadAGEmax#,#form.jobadGENDER#,#f orm.jobadNOofVACANCIES#,'#form
    ..jobadPOSITIONrequirement#','#form.jobadPOSrespon sibilities#','#form.joadFOOTER#
    ',#createODBCdate(date)#,#form.jobadRepostDuration #,'#form.jobadPOSLOCATION#',#f
    orm.jobadRECEIVEresume#,#form.jobadEMAILresume#,#s ession.empID#,#now()#,1)
    56 : </cfquery>
    57 : <cflocation url="userAdvertisement.cfm">




    --------------------------------------------------------------------------------

    SQL insert into
    jdb.jobadtbl(jobadCOMPANYname,jobadPOSITIONtitle,j obadPOSITIONlevel,jobadJOBspec
    ialization,jobadINDUSTRY,jobadEMPLOYMENTtype,jobad YEARSofEXPERIENCE,jobadYEARSin
    Field,jobadCURRENCY,jobadMinMONTHLYsalary,jobadMax MONTHLYsalary,jobadLOCATION,jo
    badEducationLevel,jobadWORKauthorization,jobadAGEm in,jobadAGEmax,jobadGENDER,job
    adNOofVACANCIES,jobadPOSITIONrequirement,jobadPOSr esponsibilities,joadFOOTER,job
    adDEADLINE,jobadRepostDuration,jobadPOSLOCATION,jo badRECEIVEresume,jobadEMAILres
    ume,jobadOwner,jobadRepostDate,jobadActiveFlag) values('Dick Hole
    Recruitment','IP
    Officer',4,14,9,'1',2,2,'S$','1500','3000','16','4 ,5,6','1,2',,,3,1,'Degree in
    Physics, Material Science, Maths Min 2 years experience in Intellectual
    Property asministration Proactive, Team player and professional Resourceful and
    Independent','','',{d '2006-04-09'},2,'1,2',2,1,1,{ts '2006-03-09 16:59:05'},1)

    DATASOURCE db
    VENDORERRORCODE 1064
    SQLSTATE 42000

    ky_loh Guest

  2. Similar Questions and Discussions

    1. ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
      When i try to start my mysql server, i get this error ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'...
    2. CF 7 data source error with MySQL 4.1
      Ok, I am struggling here. I have read everything I could find on hooking up to MySQL on a local machine and I am still getting this error. I...
    3. id after insert in MySQL
      I'm trying to obtain the id of an INSERTed MySQL record (which is set as AUTO INCREMENT in my table btw). I believe the php function is...
    4. Mysql and binary data insert
      Hello, I have a question, how to insert binary data into the table by MySql DBI module ? Thanks Michal Weinfurtner
    5. mysql load data infile error from inside a perl program
      This is my first attempt at writing something with Perl, so this is beyond a newbie question. I'm both creating a table and trying to use the...
  3. #2

    Default Re: Error in insert Data into MySQL 5.0.18

    It's probably a variable that should be surrounded by single quotes. Check your datatypes.
    mowebdev 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