|
 |
access_asp thread: passing values to an access query via asp/sql?
Message #1 by mcollins@c... on Fri, 5 Oct 2001 17:39:48
|
|
hi all.
i'm using this query on an asp page to an access database:
SQL = "SELECT * FROM [ACD Data Report 4] WHERE postdate Between #" &
begin_date & "# And #" & end_date & "#"
I would LIKE to, instead, build the query in access, and call that from my
asp page, passing the two date variables to the query. does anyone know
the syntax for this?
thanks
Message #2 by "Jon Shoreman" <jon.shoreman@b...> on Thu, 11 Oct 2001 10:03:11
|
|
> hi all.
>
> i'm using this query on an asp page to an access database:
>
> SQL = "SELECT * FROM [ACD Data Report 4] WHERE postdate Between #" &
> begin_date & "# And #" & end_date & "#"
>
>
> I would LIKE to, instead, build the query in access, and call that from
my
> asp page, passing the two date variables to the query. does anyone know
> the syntax for this?
>
> thanks
Set ObjComm = Server.CreateObject ("ADODB.Command")
ObjComm.ActiveConnection = strConnect
ObjComm.CommandText = "qry_Name"
ObjComm.CommandType = adCmdStoredProc
ObjComm.Parameters.Append ObjComm.CreateParameter
("param_Name1",adDBDate,adParamInput,10)
ObjComm.Parameters.Append ObjComm.CreateParameter
("param_Name2",adDBDate,adParamInput,10)
ObjComm.Parameters ("param_Name1") = var1
ObjComm.Parameters ("param_Name2") = var2
Set ObjRS = ObjComm.Execute
|
|
 |