Forums
This topic is locked
Someone please help [V]
Posted 11 Apr 2006 17:07:17
1
has voted
11 Apr 2006 17:07:17 stany berden posted:
I have a query looking for a date in a access database, but some how if de day is between 1 en 12 the query dont work, for examplethe date in de database is 1/06/2006 ans the query is "select someting from someting where date = #01/06/2006#" i get noting but when i use #06/01/2006# it is working fine.
I searched the internet and didt find the same problem but no solution.
can someone please give me a hint here.
kind regards
Replies
Replied 12 Apr 2006 19:40:19
12 Apr 2006 19:40:19 micah santos replied:
use these codes instead:
<%
Dim rsSearch,strSearch
strSearch = Request.Form("search"
Set rsSearch = ObjConn.Execute("SELECT * FROM USERS WHERE cDate LIKE '%" & strSearch & "%' "
If rsSearch.EOF Then
response.write "Query not found!"
Else
response.write rsSearch("FIELD1" & " - - " & rsSearch("FIELD2"
End If
%>
<%
Dim rsSearch,strSearch
strSearch = Request.Form("search"
Set rsSearch = ObjConn.Execute("SELECT * FROM USERS WHERE cDate LIKE '%" & strSearch & "%' "
If rsSearch.EOF Then
response.write "Query not found!"
Else
response.write rsSearch("FIELD1" & " - - " & rsSearch("FIELD2"
End If
%>
Replied 13 Apr 2006 14:39:07
13 Apr 2006 14:39:07 stany berden replied:
thx for the response, problem is solved, however whit a different solution.
<pre id=code><font face=courier size=2 id=code>
WHERE GebDatum = Format(#"&Recordset1__zoekwoord&"#, 'mm/dd/yyyy' )" & " AND
</font id=code></pre id=code>
greetz
<pre id=code><font face=courier size=2 id=code>
WHERE GebDatum = Format(#"&Recordset1__zoekwoord&"#, 'mm/dd/yyyy' )" & " AND
</font id=code></pre id=code>
greetz
Replied 13 Apr 2006 18:57:51
13 Apr 2006 18:57:51 micah santos replied:
good to know you came up with that solution!
good luck!
good luck!