maxrecords property isnt working..code included

Results 1 to 2 of 2

Thread: maxrecords property isnt working..code included

  1. #1
    coopetj Guest

    Default maxrecords property isnt working..code included

    I also posted this on the Database Forum but it hasnt received any responses in about an hour so I thought I would try it here. <BR><BR>I think I am using the maxrecors property correcty but I may be wrong. I think I may not be using the right ADO versoin or something.<BR><BR>&#060;% <BR><BR>dim conn, DSNtemp, RS, StrQ, dtPost, Caption, Recipient, Content, Author <BR><BR>&#039;Connect to DB <BR>set conn = server.createobject("adodb.connection") <BR>DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; " <BR>DSNtemp=dsntemp & "DBQ=" & server.mappath("/dbWeb/dbNews.mdb") <BR>conn.Open DSNtemp <BR><BR>&#039;Create Recordset Obj <BR>set RS = Server.CreateObject("ADODB.Recordset") <BR><BR>&#039;Set the max number of records(post) you want to display <BR>RS.maxrecords = 1 <BR><BR>&#039;Build SQL String <BR>strQ = "select * from tblNews where recipient = &#039;allstaff&#039; order by dtPost Desc" <BR><BR><BR>&#039;Open recordset and run assigned SQL Query <BR>Set Rs = conn.Execute(strQ) <BR><BR><BR>%&#062;

  2. #2
    coopetj Guest


    I had 2 recordsets with the same date so it pulled both. I changed the date on one in the table and it works.<BR><BR>Now. I obviously need to record the time as well. That is easy. When I am pulling data from the rs into the table how do I show just the date and no the usuall now() date time format?<BR><BR>Would trim work?

Posting Permissions

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