Preferred method of doing an update within Asp using Access

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Preferred method of doing an update within Asp using Access

    I was wondering what is the best method of accomplishing an update within
    Asp using Access? I was going to going to use the update method of an ado
    recordset, but I thought I would ask in case there is a more efficient way
    to do it.

    Thanks
    Terry


    Terry Murray Guest

  2. Similar Questions and Discussions

    1. Preferred method/modules for MS SQL Server access on Linux
      I've been using FreeTDS and the Sybase DBD to access a MS SQL Server database using DBI. It works reasonably well most of the time, but I've...
    2. Update method error
      I use the following to update: Dim rsEdit1 Set rsEdit1 = Server.CreateObject("ADODB.Recordset") rsEdit1.ActiveConnection = MM_shop_STRING...
    3. Update method
      I use the following to update: Dim rsEdit1 Set rsEdit1 = Server.CreateObject("ADODB.Recordset") rsEdit1.ActiveConnection = MM_shop_STRING...
    4. A VTI/Access Method for ODBC?
      Has anyone worked on developing a VTI/External Data Access Method for linking to other ODBC data sources? sending to informix-list
    5. update problem in DataGrid's UpdateCommand method
      Hi, anyone can help me to solve this little problem that i've spent a lot of time to solve it!! but i can't!!!! actually, i use a DataGrid, and...
  3. #2

    Default Re: Preferred method of doing an update within Asp using Access

    I'd go with that. Just don't ever fall into the nonsense of creating a
    recordset object when doing an update like so many people do for some
    unexplained reason!

    Ray at work

    "Terry Murray" <tgmurray@rogers.com> wrote in message
    news:F5vwb.21923$X2W1.10824@news04.bloor.is.net.ca ble.rogers.com...
    > I was wondering what is the best method of accomplishing an update within
    > Asp using Access? I was going to going to use the update method of an ado
    > recordset, but I thought I would ask in case there is a more efficient way
    > to do it.
    >
    > Thanks
    > Terry
    >
    >

    Ray at Guest

  4. #3

    Default Re: Preferred method of doing an update within Asp using Access

    Terry Murray wrote:
    > I was wondering what is the best method of accomplishing an update
    > within Asp using Access? I was going to going to use the update
    > method of an ado recordset, but I thought I would ask in case there
    > is a more efficient way to do it.
    >
    > Thanks
    > Terry
    With VB, using the recordset's update method is fine. In ASP however, you
    should use SQL DML (data modification language) instead, since it gets you
    in and out of the database so much faster than a cursor.

    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 Barrows Guest

  5. #4

    Default Re: Preferred method of doing an update within Asp using Access

    Hi Ray. So if I understand you correctly. I should not have to use the
    following statement:

    Set rst = Server.CreateObject("ADODB.Recordset")

    If its not too much trouble can you provide a little a snippet on how you
    would perform an update. Remember I am using access withing Asp.

    Thanks
    Terry

    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:erJQuYtsDHA.3196@TK2MSFTNGP11.phx.gbl...
    > I'd go with that. Just don't ever fall into the nonsense of creating a
    > recordset object when doing an update like so many people do for some
    > unexplained reason!
    >
    > Ray at work
    >
    > "Terry Murray" <tgmurray@rogers.com> wrote in message
    > news:F5vwb.21923$X2W1.10824@news04.bloor.is.net.ca ble.rogers.com...
    > > I was wondering what is the best method of accomplishing an update
    within
    > > Asp using Access? I was going to going to use the update method of an
    ado
    > > recordset, but I thought I would ask in case there is a more efficient
    way
    > > to do it.
    > >
    > > Thanks
    > > Terry
    > >
    > >
    >
    >

    Terry Murray Guest

  6. #5

    Default Re: Preferred method of doing an update within Asp using Access

    Yeah, you shouldn't have to use that statement too often.

    sSQL = "UDATE YourTable SET Something='something' WHERE Something='some
    value'"
    Set oADO = Server.CreateObject("ADODB.Connection")
    oADO.Open YourConnectionString
    oADO.Execute sSQL
    oADO.Close
    Set oADO = Nothing

    The basic idea is to connect, execute, close, and destroy as fast as
    possible. Even the building of your SQL string should be done before
    creating, connectiong, etc., for that extra .000000001 seconds. :]

    Ray at work


    "Terry Murray" <tgmurray@rogers.com> wrote in message
    news:gxvwb.22298$X2W1.17474@news04.bloor.is.net.ca ble.rogers.com...
    > Hi Ray. So if I understand you correctly. I should not have to use the
    > following statement:
    >
    > Set rst = Server.CreateObject("ADODB.Recordset")
    >
    > If its not too much trouble can you provide a little a snippet on how you
    > would perform an update. Remember I am using access withing Asp.
    >
    > Thanks
    > Terry
    >
    > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > news:erJQuYtsDHA.3196@TK2MSFTNGP11.phx.gbl...
    > > I'd go with that. Just don't ever fall into the nonsense of creating a
    > > recordset object when doing an update like so many people do for some
    > > unexplained reason!
    > >
    > > Ray at work
    > >
    > > "Terry Murray" <tgmurray@rogers.com> wrote in message
    > > news:F5vwb.21923$X2W1.10824@news04.bloor.is.net.ca ble.rogers.com...
    > > > I was wondering what is the best method of accomplishing an update
    > within
    > > > Asp using Access? I was going to going to use the update method of an
    > ado
    > > > recordset, but I thought I would ask in case there is a more efficient
    > way
    > > > to do it.
    > > >
    > > > Thanks
    > > > Terry
    > > >
    > > >
    > >
    > >
    >
    >

    Ray at Guest

  7. #6

    Default Re: Preferred method of doing an update within Asp using Access

    Hi Bob. You have definitely got me interested. Does this SQL DML work with
    Access? And if so, where can I learn how to use it?

    Thanks
    Terry

    "Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
    news:%237AntltsDHA.3496@TK2MSFTNGP11.phx.gbl...
    > Terry Murray wrote:
    > > I was wondering what is the best method of accomplishing an update
    > > within Asp using Access? I was going to going to use the update
    > > method of an ado recordset, but I thought I would ask in case there
    > > is a more efficient way to do it.
    > >
    > > Thanks
    > > Terry
    > With VB, using the recordset's update method is fine. In ASP however, you
    > should use SQL DML (data modification language) instead, since it gets you
    > in and out of the database so much faster than a cursor.
    >
    > 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.
    >
    >

    Terry Murray Guest

  8. #7

    Default Re: Preferred method of doing an update within Asp using Access

    DML is simply SQL statements using the UPDATE, INSERT and DELETE commands.
    Ray has shown you an example.

    Check out the JetSQL Reference in Access Online help. You will need to use
    the Contents tab to find it.

    Bob Barrows

    Terry Murray wrote:
    > Hi Bob. You have definitely got me interested. Does this SQL DML
    > work with Access? And if so, where can I learn how to use it?
    >
    > Thanks
    > Terry
    >
    > "Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
    > news:%237AntltsDHA.3496@TK2MSFTNGP11.phx.gbl...
    >> Terry Murray wrote:
    >>> I was wondering what is the best method of accomplishing an update
    >>> within Asp using Access? I was going to going to use the update
    >>> method of an ado recordset, but I thought I would ask in case there
    >>> is a more efficient way to do it.
    >>>
    >>> Thanks
    >>> Terry
    >> With VB, using the recordset's update method is fine. In ASP
    >> however, you should use SQL DML (data modification language)
    >> instead, since it gets you in and out of the database so much faster
    >> than a cursor.
    >>
    >> 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.
    --
    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 Guest

  9. #8

    Default Re: Preferred method of doing an update within Asp using Access

    Thanks again Ray
    Terry

    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:uGr$nqtsDHA.4056@TK2MSFTNGP11.phx.gbl...
    > Yeah, you shouldn't have to use that statement too often.
    >
    > sSQL = "UDATE YourTable SET Something='something' WHERE Something='some
    > value'"
    > Set oADO = Server.CreateObject("ADODB.Connection")
    > oADO.Open YourConnectionString
    > oADO.Execute sSQL
    > oADO.Close
    > Set oADO = Nothing
    >
    > The basic idea is to connect, execute, close, and destroy as fast as
    > possible. Even the building of your SQL string should be done before
    > creating, connectiong, etc., for that extra .000000001 seconds. :]
    >
    > Ray at work
    >
    >
    > "Terry Murray" <tgmurray@rogers.com> wrote in message
    > news:gxvwb.22298$X2W1.17474@news04.bloor.is.net.ca ble.rogers.com...
    > > Hi Ray. So if I understand you correctly. I should not have to use the
    > > following statement:
    > >
    > > Set rst = Server.CreateObject("ADODB.Recordset")
    > >
    > > If its not too much trouble can you provide a little a snippet on how
    you
    > > would perform an update. Remember I am using access withing Asp.
    > >
    > > Thanks
    > > Terry
    > >
    > > "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    > > news:erJQuYtsDHA.3196@TK2MSFTNGP11.phx.gbl...
    > > > I'd go with that. Just don't ever fall into the nonsense of creating
    a
    > > > recordset object when doing an update like so many people do for some
    > > > unexplained reason!
    > > >
    > > > Ray at work
    > > >
    > > > "Terry Murray" <tgmurray@rogers.com> wrote in message
    > > > news:F5vwb.21923$X2W1.10824@news04.bloor.is.net.ca ble.rogers.com...
    > > > > I was wondering what is the best method of accomplishing an update
    > > within
    > > > > Asp using Access? I was going to going to use the update method of
    an
    > > ado
    > > > > recordset, but I thought I would ask in case there is a more
    efficient
    > > way
    > > > > to do it.
    > > > >
    > > > > Thanks
    > > > > Terry
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Terry Murray Guest

  10. #9

    Default Re: Preferred method of doing an update within Asp using Access

    You bet. :]

    Ray at home

    "Terry Murray" <tgmurray@rogers.com> wrote in message
    news:F_vwb.22693$X2W1.6812@news04.bloor.is.net.cab le.rogers.com...
    > Thanks again Ray
    > Terry

    Ray at Guest

  11. #10

    Default Re: Preferred method of doing an update within Asp using Access

    On Mon, 24 Nov 2003 16:59:04 -0500, "Ray at <%=sLocation%>"
    <myfirstname at lane34 dot com> wrote:
    >I'd go with that. Just don't ever fall into the nonsense of creating a
    >recordset object when doing an update like so many people do for some
    >unexplained reason!
    I think it has to do with working in VB, and I've seen a number of
    tutorials that use that method. Some of my first ASP code still has
    record sets for updates and inserts, simply because I copied tutorials
    when creating it and I'm too busy (or lazy) to go back through and
    optimize it. Besides, if it works... :)

    Yeah, I know. It could work *better*.

    Jeff
    Jeff Cochran Guest

Posting Permissions

  • You may not post new threads
  • You may 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