Whats problem with this query?

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

  1. #1

    Default Whats problem with this query?

    Hi

    i dynamically generating an insert query.

    <cfquery name="s" datasource="dsnname">
    #query#
    </cfquery>

    the query contains this query:
    insert into
    CONFIG_OS(l_os,l_servicepack,l_type_os,l_langue,l_ licence,l_proprietaire)
    values ('windows','2.4.29','Microsoft Windows 2000
    Professionnel','Fran?ais','FERZ9-FD4476-9Z46-5656-F','Linkbynet')

    when i execute this i am getting this error:
    Incorrect syntax near 'windows'.)

    but if i execute in the SQL server it is executing successfully.
    and even if execute this in cfm file then also it executing fine.
    but if i given the variable which contains this query, then its giving that
    error.

    here the table name, fld names and fld values are generating dynamically.

    what will be the problem.



    vkunirs Guest

  2. Similar Questions and Discussions

    1. Whats the problem with my SQL???
      I'm having problem with my SQL Statement, can anyone help me? Here's the error: Error Type: ADODB.Recordset (0x800A0E7D) The connection cannot be...
    2. Query on Query and CF casting problem
      I am using a custom tag in MX7 that was working fine in 5 that renders a table. The input to the custom tag is a query and it's columns along with...
    3. tell me whats the problem here
      please go to www.firstacademy.net/dev/ i loaded external swfs on 2 scrollpane components. It worked pretty fine locally. but when i uploaded it,...
    4. CSS Whats the problem here?
      Hi Guys I have used CSS to control the hover on the menu of my site. It works fine is dreamweaver but only works on a few links on the site. ...
    5. Whats the problem
      Hi I have a script for a shopsystem on a Linux. There it works fine. But when I try to run it on my Windows machine, PHP says things like Notice:...
  3. #2

    Default Re: Whats problem with this query?

    if you're going to handle your SQL that way , you'll need to use the preserveSingleQuotes function.

    PaulH 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