ASP Add Record Approaches

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

  1. #1

    Default ASP Add Record Approaches

    The following ASP code yields the following run-time error, I want to know
    which approaches for adding records. Using "Insert Into" statement or AddNew
    method in recordset object?? As I mentioned in previous post, when I use
    "Insert Into" SQL statement, it yields "ADODB.Recordset error '800a0e78'
    Operation is not allowed when the object is closed."

    <%
    Dim objRS
    Set objRS = Server.CreateObject ("ADODB.Recordset")
    objRS.Open "test", strConnect, adOpenStatic, adLockOptimistic, adCmdTable
    objRS.MoveLast
    objRS.AddNew ' add a new record
    objRS("id") = "9999"
    objRS("name") = "Psycho"
    objRS.Update
    objRS.Close
    Set objRS = Nothing
    %>

    ADODB.Recordset error '800a0bb9'
    Arguments are of the wrong type, are out of acceptable range, or are in
    conflict with one another.




    Matthew Louden Guest

  2. Similar Questions and Discussions

    1. ASP connect to SQL Server 6.5 approaches
      Hi: I am looking at an ASP application that has a connection to an SQL Server 6.5 database. I believe the connection is made in the global.asa,...
    2. Find record w/ conditions met in the same child record
      I'll use 2 files to demonstrate my question. The first file is Animal. It has 4 fields. Id (serial number) ZooId (number) Name (text) Food...
    3. Approaches to Logging In
      I'm currently working on a portion of a website for my high school's band (though I'm now in college) and one of the sections contains contact...
    4. [PHP] Approaches to Logging In
      Seth Willits <mailto:seth@freaksw.com> on Friday, August 29, 2003 3:24 PM said: Well you could use cookies also but those can be tampered with....
    5. Stop adding record in subform after record count = 1
      Can someone help in in what to put after the THEN statment to allow one entry if the Record count is =>1 in the Before insert or should I set the...
  3. #2

    Default ASP Add Record Approaches

    The following ASP code yields the following run-time error, I want to know
    which approaches for adding records. Using "Insert Into" statement or AddNew
    method in recordset object?? As I mentioned in previous post, when I use
    "Insert Into" SQL statement, it yields "ADODB.Recordset error '800a0e78'
    Operation is not allowed when the object is closed."

    <%
    Dim objRS
    Set objRS = Server.CreateObject ("ADODB.Recordset")
    objRS.Open "test", strConnect, adOpenStatic, adLockOptimistic, adCmdTable
    objRS.MoveLast
    objRS.AddNew ' add a new record
    objRS("id") = "9999"
    objRS("name") = "Psycho"
    objRS.Update
    objRS.Close
    Set objRS = Nothing
    %>

    ADODB.Recordset error '800a0bb9'
    Arguments are of the wrong type, are out of acceptable range, or are in
    conflict with one another.




    Matthew Louden Guest

  4. #3

    Default Re: ASP Add Record Approaches

    [url]www.adopenstatic.com/faq/800a0bb9.asp[/url]

    That said, please see answer to your previous post - you should use the SQL
    statement, but not the recordset object.

    Cheers
    Ken

    "Matthew Louden" <jrefactors@hotmail.com> wrote in message
    news:eix3iTLhDHA.2164@TK2MSFTNGP09.phx.gbl...
    : The following ASP code yields the following run-time error, I want to know
    : which approaches for adding records. Using "Insert Into" statement or
    AddNew
    : method in recordset object?? As I mentioned in previous post, when I use
    : "Insert Into" SQL statement, it yields "ADODB.Recordset error '800a0e78'
    : Operation is not allowed when the object is closed."
    :
    : <%
    : Dim objRS
    : Set objRS = Server.CreateObject ("ADODB.Recordset")
    : objRS.Open "test", strConnect, adOpenStatic, adLockOptimistic,
    adCmdTable
    : objRS.MoveLast
    : objRS.AddNew ' add a new record
    : objRS("id") = "9999"
    : objRS("name") = "Psycho"
    : objRS.Update
    : objRS.Close
    : Set objRS = Nothing
    : %>
    :
    : ADODB.Recordset error '800a0bb9'
    : Arguments are of the wrong type, are out of acceptable range, or are in
    : conflict with one another.
    :
    :
    :
    :


    Ken Schaefer Guest

  5. #4

    Default Re: ASP Add Record Approaches

    [url]www.adopenstatic.com/faq/800a0bb9.asp[/url]

    That said, please see answer to your previous post - you should use the SQL
    statement, but not the recordset object.

    Cheers
    Ken

    "Matthew Louden" <jrefactors@hotmail.com> wrote in message
    news:eix3iTLhDHA.2164@TK2MSFTNGP09.phx.gbl...
    : The following ASP code yields the following run-time error, I want to know
    : which approaches for adding records. Using "Insert Into" statement or
    AddNew
    : method in recordset object?? As I mentioned in previous post, when I use
    : "Insert Into" SQL statement, it yields "ADODB.Recordset error '800a0e78'
    : Operation is not allowed when the object is closed."
    :
    : <%
    : Dim objRS
    : Set objRS = Server.CreateObject ("ADODB.Recordset")
    : objRS.Open "test", strConnect, adOpenStatic, adLockOptimistic,
    adCmdTable
    : objRS.MoveLast
    : objRS.AddNew ' add a new record
    : objRS("id") = "9999"
    : objRS("name") = "Psycho"
    : objRS.Update
    : objRS.Close
    : Set objRS = Nothing
    : %>
    :
    : ADODB.Recordset error '800a0bb9'
    : Arguments are of the wrong type, are out of acceptable range, or are in
    : conflict with one another.
    :
    :
    :
    :


    Ken Schaefer 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