Oh, of course. Access *REQUIRES* that date constants be enclosed in #...#. Your code is using '...'.
Your code is also remarkably unsafe, so I hope this is for an inTRAnet site and not for some inTERnet site
where the hackers will tear you to pieces.
strSQL = "SELECT sellerLast, sellerFirst " _
& " FROM tblComboSelect " _
& " WHERE DateSold=#" & CDate(trim(request("DateSold"))) & "# " _
& " AND DateShippedIn=#" & CDate(trim(request("DateShippedIn"))) & "#"
Doesn't anybody in your shop have some experience with databases and/or web programming?
I feel that you are simply bumping your way along from one thing to the next with
no real sense of direction. You seem to need way more hope that we can
give you in a forum of this nature.
Â Â Set oRs=Server.CreateObject("adodb.recordset")
Â Â oRs.Open strSQL, conn
Â Â if not oRs.eof then %>
Â <select name="dateSold">
<% Â Â Â do until oRs.eof %>
<option value="<%= ors("sellerLast") %>, <%= ors("sellerFirst") %>"><%= ors("sellerLast") %>, <%= ors("sellerFirst") %></option>
<% Â Â oRs.MoveNext
Â loop %>
<% else %>
Â <i>No records found for that car</i>
<% end if
Â Â Â else
Â Â 'user has not selected a car therefore do not show date select box
Â Â response.write "<i>No car selected yet</i>"
Â Â Â end if %>
I do not know why this code above generate errors.
Can you please help?
Thanks very much.
Edited by - jennypretty on 12/02/2008 5:58:35 PM
Go to Top of Page
Topic Next Topic
New Topic Reply to Topic Subscribe to this topic Subscribe to this topic Send Topic to a Friend Printer Friendly
Spell Checker Quick Reply
* HTML is OFF
* Forum Code is ON