[thelist] VBScript/ASP string concatenation problem

Joshua Olson joshua at waetech.com
Wed Jul 27 12:34:52 CDT 2005


> -----Original Message-----
> From: Pringle, Ron
> Sent: Wednesday, July 27, 2005 12:54 PM
> 
> I'm using the fileSystemObject to check to see if a PDF file 
> exists. The
> path to the file is dynamic, based on a number of fields in 
> the db query.
> I'm trying to assign that dynamic path to a variable but am 
> having problems
> contatenating.
> 
> fsPath= "documents/aldermen/agendas/" &
> Year(DetailsRecordSet.Fields.Item("eventDate").Value) & "/" &
> Details.RecordSet.Fields.Item("committeeCode").Value &
> fncFmtDate((DetailsRecordSet.Fields.Item("eventDate").Value), 
> "%b%d%Y") &
> "agd.pdf"
> 
> The above returns an Object required: " error.

Hi Ron,

I must ask... why are you using the _complicated_ method to access values?
Is there a reason you don't use this syntax?:

fsPath= "documents/aldermen/agendas/" & Year(DetailsRecordSet("eventDate"))
& "/" & Details("committeeCode") &
fncFmtDate((DetailsRecordSet("eventDate")), "%b%d%Y") & "agd.pdf"

Using this simpler syntax may expose your error (a few missing period :-))

<><><><><><><><><><>
Joshua L. Olson
WAE Tech Inc.
http://www.waetech.com/
Phone: 706.210.0168 
Fax: 413.812.4864

Monitor bandwidth usage on IIS6 in real-time:
http://www.waetech.com/services/iisbm/




More information about the thelist mailing list