View Single Post
  #10 (permalink)  
Old June 22nd, 2006, 04:00 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

If you look at the stuff that works and that doesn't, you'll see there's a difference in quotes. When you send statements to a database, values like text need to be enclosed in single quotes. Your latter statement has that; the former not. This should work:

"UPDATE tblKPI KPI_URL = '" & strPath & "' WHERE KPI_ID = " & strID & ";"

Notice the single quotes before and after strPath. Not sure if the WHERE clause needs them as well. If KPI_ID is a number, you don't need them; if it's text, you need to wrap the value of strID in quotes as well.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Reply With Quote