table not updated

Discussion in 'ASP General' started by xarrisx, Oct 12, 2004.

  1. xarrisx

    xarrisx Guest

    I am using an Insert command in my asp code that Inserts a rows in my
    database.
    After the Insert command i create a recordset and ask for all the rows in
    the table that i aplied the insert command
    Some times the rows i get are correct but sometimes the database is not
    updated by the time the recordset is opened.

    Is there any way to wait until the table is updated with the new rows and
    then open the
    recordset?

    <%
    Dim Cmd_insord
    set Cmd_insord = Server.CreateObject("ADODB.Command")
    Cmd_insord.ActiveConnection = mystring
    Cmd_insord.CommandText = "INSERT INTO PP3 (order_status) VALUES (0) "
    Cmd_insord.CommandType = 1
    Cmd_insord.CommandTimeout = 0
    Cmd_insord.Prepared = true
    Cmd_insord.Execute() 'here i execute the insert command
    %>
    <%
    Dim RS_ORDER
    Set RS_ORDER = Server.CreateObject("ADODB.Recordset")
    RS_ORDER.ActiveConnection = MM_connDUgallery_STRING
    RS_ORDER.Source = "SELECT * FROM PP3 WHERE order_status=0"
    RS_ORDER.CursorType = 0
    RS_ORDER.CursorLocation = 2
    RS_ORDER.LockType = 1
    RS_ORDER.Open() ' when the program reaches here the PP3 table may not
    allready contain the new added records
    %>
    xarrisx, Oct 12, 2004
    #1
    1. Advertising

  2. xarrisx wrote:
    > I am using an Insert command in my asp code that Inserts a rows in my
    > database.


    What database type and version are you using? I suspect it's Access but i
    would like to be sure.

    --
    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 Barrows [MVP], Oct 12, 2004
    #2
    1. Advertising

  3. xarrisx

    xarrisx Guest

    it is access and i am using dsnless connection if this makes any difference


    "Bob Barrows [MVP]" <> wrote in message
    news:#...
    > xarrisx wrote:
    > > I am using an Insert command in my asp code that Inserts a rows in my
    > > database.

    >
    > What database type and version are you using? I suspect it's Access but i
    > would like to be sure.
    >
    > --
    > 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.
    >
    >
    xarrisx, Oct 12, 2004
    #3
  4. I answered this in .db.

    Please do not multipost. it does not increase your chances of getting your
    question answered.

    Bob Barrows
    xarrisx wrote:
    > it is access and i am using dsnless connection if this makes any
    > difference
    >
    >
    > "Bob Barrows [MVP]" <> wrote in message
    > news:#...
    >> xarrisx wrote:
    >>> I am using an Insert command in my asp code that Inserts a rows in
    >>> my database.

    >>
    >> What database type and version are you using? I suspect it's Access
    >> but i would like to be sure.
    >>
    >> --
    >> 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.


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Oct 13, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Williams
    Replies:
    2
    Views:
    1,122
    Jacob Yang [MSFT]
    Aug 12, 2003
  2. Ceri
    Replies:
    2
    Views:
    420
    Ceri Locke
    Dec 17, 2003
  3. Webby
    Replies:
    0
    Views:
    1,086
    Webby
    Sep 18, 2004
  4. Newsguy
    Replies:
    4
    Views:
    398
    Gary Dale
    Oct 22, 2005
  5. Dmitry Korolyov

    Datagrid not updated during delete, but updated during insert and update

    Dmitry Korolyov, Sep 22, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    411
    Dmitry Korolyov
    Sep 22, 2003
Loading...

Share This Page