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 - 28 Sep 2003 09:52 GMT
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:
http://www.adopenstatic.com/faq/80040e14.asp
Cheers
Ken
: The following is the code, can someone please help me with the syntax please
: in the first line please
[quoted text clipped - 16 lines]
: & "Deleted = '" & Deleted & "' WHERE " _
: & "idProperty = " & ID
David Wapnick - 29 Sep 2003 09:05 GMT
I have to say that your response was great and I have solved the problem,
many thanks to you.
Regards,
David
> a) First, allocate the string to a variable, and response.write() the value,
> so you can see what's being sent to the database.
[quoted text clipped - 51 lines]
> : & "Deleted = '" & Deleted & "' WHERE " _
> : & "idProperty = " & ID
Ken Schaefer - 29 Sep 2003 11:23 GMT
Glad you got the problem solved!
Cheers
Ken
: I have to say that your response was great and I have solved the problem,
: many thanks to you.
[quoted text clipped - 59 lines]
: > : & "Deleted = '" & Deleted & "' WHERE " _
: > : & "idProperty = " & ID
Atrax - 28 Sep 2003 10:12 GMT
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
http://rtfm.atrax.co.uk/
newsflash : Atrax.Richedit 1.0 now released.
http://rtfm.atrax.co.uk/infinitemonkeys/components/Atrax.RichEdit/