Professional Web Applications Themes

Syntax error (missing operator) in query expression'idProperty=' - ASP Database

The following is the code, can someone please help me with the syntax please in the first line please Conn.Execute "UPDATE tblRentalProperty SET " _ & "tblPropertyType = '" & tblPropertyType & "', " _ & "tblRooms ='" & tblRooms & "', " _ & "tblWeeklyPrice = '" & tblWeeklyPrice & "', " _ & "tblImage = '" & tblImage & "', " _ & "tblBriefDescription = '" & tblBriefDescription & "', " _ & "tblDetailedDescription = '" & tblDetailedDescription & "', " _ & "tblStatus = '" & tblStatus & "', " _ & "tblAddress1 = '" & tblAddress1 ...

  1. #1

    Default Syntax error (missing operator) in query expression'idProperty='

    The following is the code, can someone please help me with the syntax please
    in the first line please

    Conn.Execute "UPDATE tblRentalProperty SET " _
    & "tblPropertyType = '" & tblPropertyType & "', " _
    & "tblRooms ='" & tblRooms & "', " _
    & "tblWeeklyPrice = '" & tblWeeklyPrice & "', " _
    & "tblImage = '" & tblImage & "', " _
    & "tblBriefDescription = '" & tblBriefDescription & "', " _
    & "tblDetailedDescription = '" & tblDetailedDescription & "', " _
    & "tblStatus = '" & tblStatus & "', " _
    & "tblAddress1 = '" & tblAddress1 & "', " _
    & "tblAddress2 = '" & tblAddress2 & "', " _
    & "tblAddress3 = '" & tblAddress3 & "', " _
    & "tblAddress4 = '" & tblAddress4 & "', " _
    & "tblPostCode = '" & tblPostCode & "', " _
    & "tblCountry = '" & tblCountry & "', " _
    & "idArea = '" & idArea & "', " _
    & "Deleted = '" & Deleted & "' WHERE " _
    & "idProperty = " & ID





    David Wapnick Guest

  2. #2

    Default Re: Syntax error (missing operator) in query expression'idProperty='

    a) First, allocate the string to a variable, and response.write() the value,
    so you can see what's being sent to the database.

    eg:

    <%
    strSQL = "UPDATE tblRentalProperty SET " _
    & "tblPropertyType = '" & tblPropertyType & "', " _
    & "tblRooms ='" & tblRooms & "', " _
    & "tblWeeklyPrice = '" & tblWeeklyPrice & "', " _
    & "tblImage = '" & tblImage & "', " _
    & "tblBriefDescription = '" & tblBriefDescription & "', " _
    & "tblDetailedDescription = '" & tblDetailedDescription & "', " _
    & "tblStatus = '" & tblStatus & "', " _
    & "tblAddress1 = '" & tblAddress1 & "', " _
    & "tblAddress2 = '" & tblAddress2 & "', " _
    & "tblAddress3 = '" & tblAddress3 & "', " _
    & "tblAddress4 = '" & tblAddress4 & "', " _
    & "tblPostCode = '" & tblPostCode & "', " _
    & "tblCountry = '" & tblCountry & "', " _
    & "idArea = '" & idArea & "', " _
    & "Deleted = '" & Deleted & "' WHERE " _
    & "idProperty = " & ID

    Response.Write(strSQL)
    Response.End
    %>

    b) Then check here for explanations of the cause:
    [url]http://www.adopenstatic.com/faq/80040e14.asp[/url]

    Cheers
    Ken

    "David Wapnick" <david.wapnickbtinternet.com> wrote in message
    news:bl675k$9li$1sparta.btinternet.com...
    : The following is the code, can someone please help me with the syntax
    please
    : in the first line please
    :
    : Conn.Execute "UPDATE tblRentalProperty SET " _
    : & "tblPropertyType = '" & tblPropertyType & "', " _
    : & "tblRooms ='" & tblRooms & "', " _
    : & "tblWeeklyPrice = '" & tblWeeklyPrice & "', " _
    : & "tblImage = '" & tblImage & "', " _
    : & "tblBriefDescription = '" & tblBriefDescription & "', " _
    : & "tblDetailedDescription = '" & tblDetailedDescription & "', " _
    : & "tblStatus = '" & tblStatus & "', " _
    : & "tblAddress1 = '" & tblAddress1 & "', " _
    : & "tblAddress2 = '" & tblAddress2 & "', " _
    : & "tblAddress3 = '" & tblAddress3 & "', " _
    : & "tblAddress4 = '" & tblAddress4 & "', " _
    : & "tblPostCode = '" & tblPostCode & "', " _
    : & "tblCountry = '" & tblCountry & "', " _
    : & "idArea = '" & idArea & "', " _
    : & "Deleted = '" & Deleted & "' WHERE " _
    : & "idProperty = " & ID


    Ken Schaefer Guest

  3. #3

    Default Re: Syntax error (missing operator) in query expression'idProperty='

    do this :

    strSQL = "UPDATE tblRentalProperty SET " _
    & "tblPropertyType = '" & tblPropertyType & "', " _
    & "tblRooms ='" & tblRooms & "', " _
    & "tblWeeklyPrice = '" & tblWeeklyPrice & "', " _
    & "tblImage = '" & tblImage & "', " _
    & "tblBriefDescription = '" & tblBriefDescription & "', " _
    & "tblDetailedDescription = '" & tblDetailedDescription & "', " _
    & "tblStatus = '" & tblStatus & "', " _
    & "tblAddress1 = '" & tblAddress1 & "', " _
    & "tblAddress2 = '" & tblAddress2 & "', " _
    & "tblAddress3 = '" & tblAddress3 & "', " _
    & "tblAddress4 = '" & tblAddress4 & "', " _
    & "tblPostCode = '" & tblPostCode & "', " _
    & "tblCountry = '" & tblCountry & "', " _
    & "idArea = '" & idArea & "', " _
    & "Deleted = '" & Deleted & "' WHERE " _
    & "idProperty = " & ID

    Response.Write strSQL
    Conn.execute strSQL

    that'll show you EXACTLY what's being passed to the DB - and you're more
    likely to spot the error that way - a very commonly used debugging trick
    and one to remember.



    ________________________________________
    Atrax. MVP, IIS
    [url]http://rtfm.atrax.co.uk/[/url]

    newsflash : Atrax.Richedit 1.0 now released.
    [url]http://rtfm.atrax.co.uk/infinitemonkeys/components/Atrax.RichEdit/[/url]

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Atrax Guest

  4. #4

    Default Re: Syntax error (missing operator) in query expression'idProperty='

    I have to say that your response was great and I have solved the problem,
    many thanks to you.

    Regards,

    David

    "Ken Schaefer" <kenREMOVETHISadOpenStatic.com> wrote in message
    news:O30ZF3ZhDHA.3868tk2msftngp13.phx.gbl...
    > a) First, allocate the string to a variable, and response.write() the
    value,
    > so you can see what's being sent to the database.
    >
    > eg:
    >
    > <%
    > strSQL = "UPDATE tblRentalProperty SET " _
    > & "tblPropertyType = '" & tblPropertyType & "', " _
    > & "tblRooms ='" & tblRooms & "', " _
    > & "tblWeeklyPrice = '" & tblWeeklyPrice & "', " _
    > & "tblImage = '" & tblImage & "', " _
    > & "tblBriefDescription = '" & tblBriefDescription & "', " _
    > & "tblDetailedDescription = '" & tblDetailedDescription & "', " _
    > & "tblStatus = '" & tblStatus & "', " _
    > & "tblAddress1 = '" & tblAddress1 & "', " _
    > & "tblAddress2 = '" & tblAddress2 & "', " _
    > & "tblAddress3 = '" & tblAddress3 & "', " _
    > & "tblAddress4 = '" & tblAddress4 & "', " _
    > & "tblPostCode = '" & tblPostCode & "', " _
    > & "tblCountry = '" & tblCountry & "', " _
    > & "idArea = '" & idArea & "', " _
    > & "Deleted = '" & Deleted & "' WHERE " _
    > & "idProperty = " & ID
    >
    > Response.Write(strSQL)
    > Response.End
    > %>
    >
    > b) Then check here for explanations of the cause:
    > [url]http://www.adopenstatic.com/faq/80040e14.asp[/url]
    >
    > Cheers
    > Ken
    >
    > "David Wapnick" <david.wapnickbtinternet.com> wrote in message
    > news:bl675k$9li$1sparta.btinternet.com...
    > : The following is the code, can someone please help me with the syntax
    > please
    > : in the first line please
    > :
    > : Conn.Execute "UPDATE tblRentalProperty SET " _
    > : & "tblPropertyType = '" & tblPropertyType & "', " _
    > : & "tblRooms ='" & tblRooms & "', " _
    > : & "tblWeeklyPrice = '" & tblWeeklyPrice & "', " _
    > : & "tblImage = '" & tblImage & "', " _
    > : & "tblBriefDescription = '" & tblBriefDescription & "', " _
    > : & "tblDetailedDescription = '" & tblDetailedDescription & "', " _
    > : & "tblStatus = '" & tblStatus & "', " _
    > : & "tblAddress1 = '" & tblAddress1 & "', " _
    > : & "tblAddress2 = '" & tblAddress2 & "', " _
    > : & "tblAddress3 = '" & tblAddress3 & "', " _
    > : & "tblAddress4 = '" & tblAddress4 & "', " _
    > : & "tblPostCode = '" & tblPostCode & "', " _
    > : & "tblCountry = '" & tblCountry & "', " _
    > : & "idArea = '" & idArea & "', " _
    > : & "Deleted = '" & Deleted & "' WHERE " _
    > : & "idProperty = " & ID
    >
    >

    David Wapnick Guest

  5. #5

    Default Re: Syntax error (missing operator) in query expression'idProperty='

    Glad you got the problem solved!

    Cheers
    Ken


    "David Wapnick" <david.wapnickbtinternet.com> wrote in message
    news:bl8p4i$m97$1hercules.btinternet.com...
    : I have to say that your response was great and I have solved the problem,
    : many thanks to you.
    :
    : Regards,
    :
    : David
    :
    : "Ken Schaefer" <kenREMOVETHISadOpenStatic.com> wrote in message
    : news:O30ZF3ZhDHA.3868tk2msftngp13.phx.gbl...
    : > a) First, allocate the string to a variable, and response.write() the
    : value,
    : > so you can see what's being sent to the database.
    : >
    : > eg:
    : >
    : > <%
    : > strSQL = "UPDATE tblRentalProperty SET " _
    : > & "tblPropertyType = '" & tblPropertyType & "', " _
    : > & "tblRooms ='" & tblRooms & "', " _
    : > & "tblWeeklyPrice = '" & tblWeeklyPrice & "', " _
    : > & "tblImage = '" & tblImage & "', " _
    : > & "tblBriefDescription = '" & tblBriefDescription & "', " _
    : > & "tblDetailedDescription = '" & tblDetailedDescription & "', " _
    : > & "tblStatus = '" & tblStatus & "', " _
    : > & "tblAddress1 = '" & tblAddress1 & "', " _
    : > & "tblAddress2 = '" & tblAddress2 & "', " _
    : > & "tblAddress3 = '" & tblAddress3 & "', " _
    : > & "tblAddress4 = '" & tblAddress4 & "', " _
    : > & "tblPostCode = '" & tblPostCode & "', " _
    : > & "tblCountry = '" & tblCountry & "', " _
    : > & "idArea = '" & idArea & "', " _
    : > & "Deleted = '" & Deleted & "' WHERE " _
    : > & "idProperty = " & ID
    : >
    : > Response.Write(strSQL)
    : > Response.End
    : > %>
    : >
    : > b) Then check here for explanations of the cause:
    : > [url]http://www.adopenstatic.com/faq/80040e14.asp[/url]
    : >
    : > Cheers
    : > Ken
    : >
    : > "David Wapnick" <david.wapnickbtinternet.com> wrote in message
    : > news:bl675k$9li$1sparta.btinternet.com...
    : > : The following is the code, can someone please help me with the syntax
    : > please
    : > : in the first line please
    : > :
    : > : Conn.Execute "UPDATE tblRentalProperty SET " _
    : > : & "tblPropertyType = '" & tblPropertyType & "', " _
    : > : & "tblRooms ='" & tblRooms & "', " _
    : > : & "tblWeeklyPrice = '" & tblWeeklyPrice & "', " _
    : > : & "tblImage = '" & tblImage & "', " _
    : > : & "tblBriefDescription = '" & tblBriefDescription & "', " _
    : > : & "tblDetailedDescription = '" & tblDetailedDescription & "', " _
    : > : & "tblStatus = '" & tblStatus & "', " _
    : > : & "tblAddress1 = '" & tblAddress1 & "', " _
    : > : & "tblAddress2 = '" & tblAddress2 & "', " _
    : > : & "tblAddress3 = '" & tblAddress3 & "', " _
    : > : & "tblAddress4 = '" & tblAddress4 & "', " _
    : > : & "tblPostCode = '" & tblPostCode & "', " _
    : > : & "tblCountry = '" & tblCountry & "', " _
    : > : & "idArea = '" & idArea & "', " _
    : > : & "Deleted = '" & Deleted & "' WHERE " _
    : > : & "idProperty = " & ID
    : >
    : >
    :
    :


    Ken Schaefer Guest

Similar Threads

  1. Syntax error (missing operator) in query expression
    By crystalfish0318 in forum Coldfusion Database Access
    Replies: 3
    Last Post: May 23rd, 06:00 PM
  2. Replies: 6
    Last Post: September 2nd, 01:22 PM
  3. Access: (missing operator) in query expression
    By Bob the ASP Builder in forum ASP Database
    Replies: 1
    Last Post: February 12th, 05:18 AM
  4. Syntax error in Query Expression,
    By Raphael Gluck in forum ASP
    Replies: 1
    Last Post: October 13th, 12:29 PM
  5. Replies: 4
    Last Post: July 11th, 07:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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