table not updated

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • xarrisx

    table not updated

    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.CreateOb ject("ADODB.Com mand")
    Cmd_insord.Acti veConnection = mystring
    Cmd_insord.Comm andText = "INSERT INTO PP3 (order_status) VALUES (0) "
    Cmd_insord.Comm andType = 1
    Cmd_insord.Comm andTimeout = 0
    Cmd_insord.Prep ared = true
    Cmd_insord.Exec ute() 'here i execute the insert command
    %>
    <%
    Dim RS_ORDER
    Set RS_ORDER = Server.CreateOb ject("ADODB.Rec ordset")
    RS_ORDER.Active Connection = MM_connDUgaller y_STRING
    RS_ORDER.Source = "SELECT * FROM PP3 WHERE order_status=0"
    RS_ORDER.Cursor Type = 0
    RS_ORDER.Cursor Location = 2
    RS_ORDER.LockTy pe = 1
    RS_ORDER.Open() ' when the program reaches here the PP3 table may not
    allready contain the new added records
    %>


  • Bob Barrows [MVP]

    #2
    Re: table not updated

    xarrisx wrote:[color=blue]
    > I am using an Insert command in my asp code that Inserts a rows in my
    > database.[/color]

    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.


    Comment

    • xarrisx

      #3
      Re: table not updated

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


      "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcom> wrote in message
      news:#Na8LSIsEH A.2948@TK2MSFTN GP11.phx.gbl...[color=blue]
      > xarrisx wrote:[color=green]
      > > I am using an Insert command in my asp code that Inserts a rows in my
      > > database.[/color]
      >
      > 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.
      >
      >[/color]


      Comment

      • Bob Barrows [MVP]

        #4
        Re: table not updated

        I answered this in .db.

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

        Bob Barrows
        xarrisx wrote:[color=blue]
        > it is access and i am using dsnless connection if this makes any
        > difference
        >
        >
        > "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcom> wrote in message
        > news:#Na8LSIsEH A.2948@TK2MSFTN GP11.phx.gbl...[color=green]
        >> xarrisx wrote:[color=darkred]
        >>> I am using an Insert command in my asp code that Inserts a rows in
        >>> my database.[/color]
        >>
        >> 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.[/color][/color]

        --
        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"


        Comment

        Working...