vbscript - Search data between 3 conditions -
i used search in database sql.
html:
<form name="frmreport" method="get" action=""> <input id="txtkeyword" class="textbox" type="text" size="1" name="keyword" value="<%=keyword%>"> <input type="text" name="sdate" style="width:100; height:19" size="20" id="datepicker" class="textbox"> <input type="text" name="edate" style="width:100; height:19" size="20" id="datepickerexp" class="textbox"> <input type="submit" value="viewreport" name="btnsearch" style="font-family: arial, tahoma; font-size: 9pt; border-style: outset; border-width: 2px;height:20;width:90"> </form>
asp:
dim keyword, startdate, enddate keyword = request.querystring("keyword") startdate = request.querystring(startdate") enddate = request.querystring("enddate") strsql = "select * report userid '%" & keyword & _ "' , datepo between #" & startdate & "# , #" & enddate & "#" rs.open strsql, conn, 3, 1 conn.execute(strsql)
i encountering errors (line 40 sql statement).
microsoft jet database engine error '80040e07'
syntax error in date in query expression 'userid '%' , datepo between ## >= ## , ## <=##'. /viewreport.asp, line 40
Comments
Post a Comment