Results 1 to 2 of 2

Thread: SQL for inserting

  1. #1
    Join Date
    Mar 2004
    Posts
    5

    SQL for inserting

    hi there!
    can one plz tell how to insert the record in ASP code for this conditon!
    how to isert record repeatly(weekly or monthly) until the specific time?!when user select to insert data weekly until specific of time!

  2. #2
    Join Date
    Oct 2002
    Posts
    93
    Hi,

    Pretty hard to tell from your question exactly what you're after. I'll try and "guess" though...

    You say to "repeately insert records". Assuming that means you want to insert some "batch" of records until a condition is met?

    You say, "until a specific time" - probably meaning until a given date / time has occurred?

    Well, let me point you in the right direction.

    If you have a batch of records you want to insert into a database, use dbSilentCmdText inside a LOOP (i.e. For/Next).

    To have it repeat that until a certain "time" or "date", put an IF check in that loop checking the date against the date you're after. You can use the now() function for today, and the DateDiff() function to compare dates.

    Hope this helps. If it's not enough, then explain your question better - possibly using an example or two.

    Thanks,
    John

Posting Permissions

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