473,407 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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.


Jul 19 '05 #1
1 3573
www.adopenstatic.com/faq/800a0bb9.asp

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

Cheers
Ken

"Matthew Louden" <jr********@hotmail.com> wrote in message
news:ei**************@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.
:
:
:
:
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stormkid | last post by:
Hi Group, I'm trying to figure out the best way to avoid the situation of when two or more users access a record for a certain product around the same time but say user1 sits and reads the...
17
by: Rick | last post by:
Hi all, Is there a MySQL function to get the first record through a query? I would like to open a page of client records with the first one shown. The other records can be accessed from a...
4
by: shank | last post by:
I have a recordset 'rsProducts' If "one and only one" record is found, how can I redirect? thanks
5
by: ken | last post by:
I had to reinstall Windows 2000 Pro and of course Access 2000. I HAD each record displaying a photo but now it does not show them. The WEIRD thing is that when I upload the database to my...
20
by: Greg | last post by:
I'm fairly new to access (using 2002) and am setting up a DB for work. along with each record the user also needs to make a flow diagram (previously, these reports were composed in word and they...
4
by: bdotson | last post by:
Does anyone know the record limit for a single table in Access 97? I have a client who has over 800,000 records in one table. They are experiencing math problems and timeouts when running reports....
12
by: Wadim Grasza | last post by:
I want to store and display (on a form or a report) multiple pictures per record in an access database. The pictures are not stored within the database. They are stored as files and the database...
19
by: MaXX | last post by:
Hi, I hope I'm not OT. I have the following issue: I want to delete a record from my db with a php script. Let's say I'm auth'd and I want to delete the record id 440. With a simple form (get...
1
by: chrislewis21 | last post by:
How does one get a form to default to a new/blank record upon opening? Thanks, Chris
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.