Thanks Bonnie, that gets me closer, but still no cigar. The expression now comes out as
between(s.sdate1,'7/1/2004 12:00:00 AM','7/8/2005 12:00:00 AM')
and I'm getting the same error.
I remember hearing about a VFP Toolkit for .NET that's supposed to ease the transition - think I'll dig that up and see if there might be something in there that would help.
I appreciate your suggestions. I'm just learning ASP.NET with this one app, and while I was initially blown away by how much easier it is than classic ASP there are things like this that have me banging my head against the wall.
John
>It's been awhile since I've done anything with VFP, so I don't know if this is legit, but can you delimit with quotes instead of {}? If so, you'd have this instead:
>
> dim MySql as string = String.Format("select s.sdate1,s.sdate2,s.Location,c.cTitle,e.hours " & _
> "from dtrSess s join dtrEnroll e on e.scode=s.scode join dtrCourse c on c.ccode=s.ccode " & _
> "where e.id_code= {0} and between(s.sdate1,'{1}','{2}')", Request.Item("ID"),dRdate1,dRdate2)
>
>