ho un problema a fare delle query sql con asp e i campi data. su access è impostato come capo data/ora e proprietà campo data generica
non so piu cosa fare aiutatemi!!!codice:if request("dal") <> vbnullstring and request("a") = vbnullstring then sql = sql & "AND datainserimento >= " & FormatDateTime(request("dal")) end if SELECT * FROM lista WHERE 1=1 AND datainserimento >= 01/01/2006 me le tira fuori tutte anche quelle superiori a quella data if request("dal") = vbnullstring and request("a") <> vbnullstring then sql = sql & "AND datainserimento <= " & FormatDateTime(request("a")) end if SELECT * FROM lista WHERE 1=1 AND datainserimento <= 01/01/2006 non tira fuori nulla if request("dal") <> vbnullstring and request("a") <> vbnullstring then sql = sql & " datainserimento Between " & FormatDateTime(request("dal")) & " And " & FormatDateTime(request("a")) end if SELECT * FROM lista WHERE 1=1 datainserimento Between 01/09/2005 And 01/01/2006 Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '1=1 datainserimento Between 01/09/2005 And 01/01/2006'. /news/cercanews.asp, line 339

 
			
			 
			 
					
					
					
						 Rispondi quotando
  Rispondi quotando