From: sravanthi on
Hi.
Hi, I am novice to ASP,I am using vb script and MSacceess for database.When
ever I use the following code it gives the error.I am sure the problem is
with entry_datetime='#"data"#' but not sure how to resolve it.It would be
great if some one helps me in resolving the following query. .

<%

data=date()

dim rs1,sql1

Set rs1 = Server.CreateObject("Adodb.RecordSet")

sql1="select * from web where format(entry_datetime,'"mm/dd/yyyy hh:min:ss"')
=format('#"data"#','"mm/dd/yyyy hh:min:ss"') and stace = 'oregon' "

rs1.open sql1,conn,1,1

%>

From: John Spencer on
sql1="SELECT* from web WHERE Format(entry_datetime,""mm/dd/yyyy hh:nn:ss"")
=Format(data,""mm/dd/yyyy hh:nn:ss"") and stace = 'oregon' "

I am concerned that Format is being used since I am not aware of whether or
not you can use FORMAT directly with Jet.


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

sravanthi wrote:
> Hi.
> Hi, I am novice to ASP,I am using vb script and MSacceess for database.When
> ever I use the following code it gives the error.I am sure the problem is
> with entry_datetime='#"data"#' but not sure how to resolve it.It would be
> great if some one helps me in resolving the following query. .
>
> <%
>
> data=date()
>
> dim rs1,sql1
>
> Set rs1 = Server.CreateObject("Adodb.RecordSet")
>
> sql1="select * from web where format(entry_datetime,'"mm/dd/yyyy hh:min:ss"')
> =format('#"data"#','"mm/dd/yyyy hh:min:ss"') and stace = 'oregon' "
>
> rs1.open sql1,conn,1,1
>
> %>
>