Professional Web Applications Themes

Insert into middle - ASP Database

Hello, I am inserting data to two table from ASP (both are referenced). The data in the second table must be inserted as per the order i entered(atually same order mentioned on the paper). Everything is ok. If i forgot to enter 3rd record, the total output will be wrong. I can enter seperately but it will be added at the end of current record. What i want is to add at particular position. How can i add a record in middle of existing recordset. I am using Access 2000 DB. Its jus like "insert into tablename before recordnumber" Thanx ...

  1. #1

    Default Insert into middle

    Hello,

    I am inserting data to two table from ASP (both are referenced). The data
    in the second table must be inserted as per the order i entered(atually same
    order mentioned on the paper). Everything is ok. If i forgot to enter 3rd
    record, the total output will be wrong. I can enter seperately but it will be
    added at the end of current record. What i want is to add at particular
    position.
    How can i add a record in middle of existing recordset. I am using Access
    2000 DB. Its jus like "insert into tablename before recordnumber"

    Thanx in advance
    Rajani Guest

  2. #2

    Default Re: Insert into middle

    You can't.

    Record 1 order1
    Record 2 order2
    Record 3 order4
    Record 4 order5
    Record 5 order6

    now you want to insert order3 in record 2 an half, thats not possible.
    Insert order3 in Record6 and use ORDER BY

    SELECT * FROM MyOrders ORDER BY OrderNr





    "Rajani" <microsoft.com> schreef in bericht
    news:com... 


    John Guest

  3. #3

    Default Re: Insert into middle

    A table is an unordered set of rows. There is no such thing as "inserting a
    record [sic] in the middle." You insert the row, and the engine decides
    where to put the row. If you want to see the data in a specific order *AT
    QUERY TIME*, then use an ORDER BY statement.

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "Rajani" <microsoft.com> wrote in message
    news:com... 
    data 
    same 
    be 


    Aaron Guest

  4. #4

    Default Re: Insert into middle

    Once again Aaron, what is the difference between my and your answer?

    "Aaron [SQL Server MVP]" <noraa> schreef in bericht
    news:phx.gbl... 
    > data 
    > same 
    > be 
    >
    >[/ref]


    John Guest

  5. #5

    Default Re: Insert into middle

    Is this a suggestion that his post should not have been made? If so:

    1. Why are you assuming he even saw your answer before posting his?
    2. Why should there be any difference between your answers? The correct
    answer is the correct answer.
    3. Why shouldn't he attempt to provide a little expansion on or
    clarification of a previously posted reply?

    Bob Barrows

    John wrote: 
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Bob Guest

  6. #6

    Default Re: Insert into middle

    Once again? What are you talking about?

    And are you saying our answers are identical? I don't think they are.

    Let me know if you think I should stay out of this newsgroup so that you can
    post the only reply to any thread you're involved in.

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "John" <n o b o d com> wrote in message
    news:h0tfd.24$telenet-ops.be... [/ref]
    "inserting [/ref]
    *AT [/ref]


    Aaron Guest

  7. #7

    Default Re: Insert into middle

    > 1. Why are you assuming he even saw your answer before posting his?
    With a difference of 4 hours ?? Are you still connected with 56 kps modem?
     
    Why to 2 answers? It only confuse things.
     
    Pfff


    ONCE AGAIN, Yes Aaron, you have the bad habit to give the same answer, or do
    i call it 'little expansion on or clarification of'. You must understand
    that English is not the native language of all posters. Unnecessarily to
    repeat them in correct English. Or is this the way to become the title of
    MVP?





    John Guest

  8. #8

    Default Re: Insert into middle

    > > 2. Why should there be any difference between your answers? The correct 
    > Why to 2 answers? It only confuse things.[/ref]

    Like I said before, I really don't think the two answers are identical. Let
    others be the judge of that, instead of just coming out and accusing me of
    being an based on your own stupid assumptions.
     
    do 

    Yes, this is how you become an MVP, by being a parrot.

    Get used to it, because now that you're in my killfile, I won't see your
    posts at all.


    Aaron Guest

  9. #9

    Default Re: Insert into middle

    John wrote: 
    > With a difference of 4 hours ??[/ref]

    Why do you think the timestamp on a message determines whether or not
    someone has received it? This is the internet. And even if he has received
    it, why do you assume that he has read it? I very often answer a question
    without reading the other replies.
     

    Me? No, I have a cable modem. I can't speak for Aaron. Even if he did have a
    56kps modem, why do you think that would have anything to do with whether or
    not his ISP's news server has received your post, given the well-known
    vagaries of the internet? And even if he had downloaded it, why do you think
    your answer was definitive enough to not need some
    reinforcement/clarification?

     
    > Why to 2 answers? It only confuse things.

    > Pfff[/ref]

    Don't be silly. Read it again. His post gave some details about relational
    database theory that yours only hinted at. If I was the OP, I would be
    grateful to receive both replies. This is not a show-up-the-other-repliers
    contest. Just because he replied does not mean he thought your reply was
    deficient. Relax. We're friends here.
     

    No. I submit that you should go to the MVP website and see the list of
    hundreds of non-English speakers in those ranks. You should drop this now.

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Bob Guest

  10. #10

    Default Re: Insert into middle

    Maybe you can get MS to add
    microsoft.public.only.john.can.answer.*

    Bob Lehmann

    "John" <n o b o d com> wrote in message
    news:Fqwfd.288$telenet-ops.be... 
    > With a difference of 4 hours ?? Are you still connected with 56 kps modem?

    > Why to 2 answers? It only confuse things.

    > Pfff
    >
    >
    > ONCE AGAIN, Yes Aaron, you have the bad habit to give the same answer, or[/ref]
    do 


    Bob Guest

  11. #11

    Default Re: Insert into middle

    I end this conversation with asking Aaron, Bob and Bob to check older
    posting. Aaron never sees the posting before. Strange, must always repeat
    what is already posted (with a little nuance) and more than once other
    people leave a little question for Aaron asking why he repeat things or even
    like me asking where the difference is. Here we call people like Aaron not
    but 'wise-nouse'. Somebody who knows things better then other. I
    wonder if Bob Barrows boss must know how much time he spend on the
    newsgroups instead of working, his boss want disconnect his open line to the
    net :-))



    John Guest

Similar Threads

  1. Question Insert from ASP to SQL using recordset data as values in insert statement
    By JasonM in forum Microsoft SQL / MS SQL Server
    Replies: 0
    Last Post: June 13th, 05:54 PM
  2. What's faster - loop for insert or insert...select.
    By mr. modus in forum Coldfusion Database Access
    Replies: 2
    Last Post: December 10th, 01:57 AM
  3. Replies: 3
    Last Post: September 30th, 09:24 PM
  4. in the middle of shift and pop
    By Decapode Azur in forum PHP Development
    Replies: 4
    Last Post: August 20th, 10:54 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139