
March 31st, 2000, 01:55 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
<i><b>Originally posted by : Chris Snider (csnider@worldnet.att.net)</b></i><br />Kevin,<br /><br />Switch you date to a string like this:<br />AND aucdate='" & conndate & "'"<br /><br />Even though it is a Date field, the ADO engine treats it like a string. Also, you will need to test your specific case, but I only get good results when I use DateField >='" & varDate & "'", but I run queries against SQL Server and not so much Access any more.<br /><br />If you have further questions or need more explanation, please email me.<br /><br />Chris Snider<br /><br /><br />------------<br />Kevin at 3/30/2000 4:49:06 AM<br /><br />Hi there,<br />I am just starting out and have come accross an error which I know is something small but I can't figure it out.<br />I have a form with two inout boxes.One for date and one for email.<br />When they boxes have been filled I do a look up on my Access Db and try to return the records based on email and date.<br />However I just seem to get a Syntax Error when I submit the form....<br />Here is the SQL <br><br /><% <br><br /> email1=Request.Form("btext")<br><br /> conndate = CDate(Request.Form("bdate"))<br><br /> %><br><br /> <br /> <%<br><br /> Set maConn=Server.CreateObject("ADODB.Connection")<br><br /> Set maRecs=Server.CreateObject("ADODB.Recordset")<br /> <br><br /> maConn.Open "track"<br><br /><br />SQL = "SELECT email,"<br><br />SQL = SQL& "name,aucdate,Qty,Price,desc "<br><br />SQL = SQL& "FROM ITEMS WHERE email = '" & Request.Form("btext") & "' " <br><br />SQL = SQL& "AND aucdate = " & #conndate# & " "<br><br /><br />maRecs.Open SQL,maConn<br><br /><br />If maRecs.EOF then<br><br /><br />Response.Write "No data found for today"<br><br /><br />else<br /><br><br />%><br><br /><br />Can anyone help me out please<br />as I keep getting a syntax error for conndate...<br />Thanks a lot <br />Kev<br /><br />
|