|
-
Mar 23rd, 2000, 07:21 PM
#1
Thread Starter
Fanatic Member
Problems with buildind sql string
can somone please advise me on ways not to go on this site ever again as it is so fecking addictive and will completly take over my life 
The application I am building has a update facility that takes values from access puts them into varios text boxes, lets the user change the value (etc)
I then build a sql string and do a db.execute to update the string is built as below.
strSQL = "UPDATE tblhotels " & _
"SET hotelkey = '" & txtHotelkey & "'," & _
"accomodationtype = " & cboacomtype & "," & _
"starrating = '" & Cbostars & "'," & _
"hotelname = '" & txtname & "'" & _
" WHERE hotelkey = '" & strHotelkey & "'"
This works fine as long as there are no ' in the text
is there any way of getting around this
Last edited by Ianpbaker; Jul 3rd, 2001 at 02:52 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|