Datum = 03.08.99 error

Results 1 to 6 of 6

Thread: Datum = 03.08.99 error

  1. #1
    na8ur Guest

    Default Datum = 03.08.99 error

    &#060;%<BR>heute=now()<BR>myDate=FormatDateTime(Da teAdd("d",20,heute),2)<BR>set rs=Server.CreateObject("ADODB.Recordset")<BR>rs.Op en "Select * FROM 3Sat WHERE Datum = " & myDate & " ORDER BY id asc","DSN=test.kunstmarkt.com"<BR>&#037;&#062;<BR> just gives this error back. but in the Datum cell an equal d.m.yyyy. format is used, so that there must be some selected entrys which could be shown.<BR>-->all in all I do want to pick up the next events out of a table--> Datum has the form d.m.yyyy as usual for europ.<BR>the error is:<BR>Microsoft OLE DB Provider for ODBC Drivers-Fehler &#039 80040e14&#039 <BR><BR>[Microsoft][ODBC Microsoft Access 97 -Treiber] Syntaxfehler in Zahl in Abfrageausdruck &#039Datum = 03.08.99&#039. <BR>Zahl = number<BR>Abfrageausdruck = requested statment.<BR><BR>thanx.

  2. #2
    Join Date
    Dec 1969
    Posts
    168

    Default RE: Datum = 03.08.99 error

    &#060;%<BR>myDate = FormatDateTime((DateAdd("y",20,Now())),2)<BR>set rs=Server.CreateObject("ADODB.Recordset")<BR>rs.Op en "Select * FROM 3Sat WHERE (Datum = " & "#" & myDate & "#) ORDER BY id asc","DSN=test.kunstmarkt.com"<BR>&#037;&#062;<BR> <BR>Hope this helps... Cheers!

  3. #3
    na8ur Guest

    Default Nope... still the same error

    still at http://www.test.kunstmarkt.com/datum.asp

  4. #4
    Join Date
    Dec 1969
    Posts
    168

    Default RE: Nope... still the same error

    Try defining the SQL statement first...<BR><BR>&#060;%<BR>myDate = FormatDateTime((DateAdd("y",20,Now())),2)<BR>set rs=Server.CreateObject("ADODB.Recordset")<BR>SQL= "Select * FROM 3Sat WHERE (Datum = " & "#" & myDate & "#) ORDER BY id asc"<BR>rs.Open SQL,"DSN=test.kunstmarkt.com"<BR>&#037;&#062;<BR>< BR>Hope this helps... Cheers!


  5. #5
    na8ur Guest

    Default n-o-p-e thanx so far Desiree !getting NUTS!

    &#060;%<BR>Dim mydate<BR>myDate = FormatDateTime((DateAdd("d",20,Now())),2)<BR>set rs=Server.CreateObject("ADODB.Recordset")<BR>SQL= "Select * FROM TVProgramme WHERE eventDat ="& myDate &" ORDER BY id asc"<BR>rs.Open SQL,"DSN=test.kunstmarkt.com"<BR>&#037;&#062;<BR>H i Desiree... with this I have best results like <BR>eventDat =04.08.99. but still it doesn´t select all the dates inbetween. <BR>why does it work when I put eventDat =date() [if there is a event today]?<BR><BR>this is driving me crazy... please help me out bevor I die :-).<BR>bye<BR>na8ur

  6. #6
    na8ur Guest

    Default WORKS no Thank you all -->here is the code

    thanx everybody for helping me. now i solved the problem and have what I was looking for.<BR>http://www.test.kunstmarkt.com/datum3.asp<BR><BR>shows the entries of the next 20 days.<BR>THE CODE:<BR>&#060;%<BR>set rs=Server.CreateObject("ADODB.Recordset")<BR>SQL= "Select * FROM TVProgramme WHERE (eventDat >= date() and eventDat &#060;= date()+20) ORDER BY id asc"<BR>rs.Open SQL,"DSN=test.kunstmarkt.com"<BR>&#037;&#062;<BR>& #060;% <BR>do while not rs.eof<BR> &#037;&#062;<BR>&#060;tr>&#060;td><BR>&#060;fon t face="Arial" size="+1"><BR>&#060;%=rs("Tag") &#037;&#062;<BR>&#060;%=rs("Regie")&#037;&#062;<BR ><BR><BR>&#060;%=rs("eventDat")&#037;&#062;<BR><BR ><BR>&#060;%=rs("Titel1")&#037;&#062;<BR>&#060;/font><BR>&#060;/td>&#060;/tr><BR>&#060;tr>&#060;td><BR><BR>&#060;% rs.Movenext<BR>loop<BR>rs.close&#037;&#062;<BR><BR >thx alot<BR>mkoch@betatribe.de

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •