C
Chumley Walrus
I'm trying to declare a variable (datetime data type), and insert that
value in the where clause of an SQL statement (I'm using MS Access db
with oledb classes) in an aspx page using vb.net:
dim todd = DateTime.Today.ToString ( "d" )
Dim strSQL as string ="SELECT article, articleheader, articleID
FROM articles WHERE (dept = 'news') AND (articledate = #<%=todd%>#)"
...it gives me Syntax error in date in query expression '(dept = 'news')
AND (articledate = #<%=todd%>#)'.
...the same with #'todd'#
using: (articledate = #4/21/2005#) works
chumley
value in the where clause of an SQL statement (I'm using MS Access db
with oledb classes) in an aspx page using vb.net:
dim todd = DateTime.Today.ToString ( "d" )
Dim strSQL as string ="SELECT article, articleheader, articleID
FROM articles WHERE (dept = 'news') AND (articledate = #<%=todd%>#)"
...it gives me Syntax error in date in query expression '(dept = 'news')
AND (articledate = #<%=todd%>#)'.
...the same with #'todd'#
using: (articledate = #4/21/2005#) works
chumley