Adding records to recordset

Results 1 to 2 of 2

Thread: Adding records to recordset

  1. #1
    Zvonko Guest

    Default Adding records to recordset

    Hello!<BR><BR>I&#039m total newbie in ASP and I&#039d like to know how can I add records to database.<BR>I already tried with this:<BR> rs.addnew<BR> rs!Dan = day(date)<BR> rs!Mesec = month(date)<BR> rs!Leto = year(date)<BR> rs!Ura = hour(now)<BR> rs!Minuta = minute(now)<BR> rs!Sekunda = second(now)<BR> rs.update<BR>but it didn&#039t work. Have I written it wrong or do I have to use SQL string to add records?<BR><BR>Regards<BR>Zvonko

  2. #2
    Adam Werner Guest

    Default RE: Adding records to recordset

    I think you&#039re close. Barring any sort of error that translates into a read/write permission problems, you should try this variation on your code:<BR><BR>rs.addnew<BR>rs("Dan") = day(date)<BR>rs("Mesec") = month(date)<BR>rs("Leto") = year(date)<BR>rs("Ura") = hour(now)<BR>rs("Minuta") = minute(now)<BR>rs("Sekunda") = second(now)<BR>rs.update<BR><BR>Give that a try. If it fails, please post the error message, and I&#039ll see what else I can do to help.<BR>

Posting Permissions

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