Click to See Complete Forum and Search --> : addnew method


pt3
03-19-2000, 05:07 PM
Hi

i am fairly new to asp and data active web pages

I am trying to program a page that will
add a new item to the database table
by requesting form data from the data entry page

I keep getting this error
------------------
ADODB.Recordset error '800a0cb3'

The operation requested by the application is not supported by the provider.


/myzone1/AddItem.asp, line 21
------------------

Now...i am using MSDN and various web pages to help me learn this
and as far as i can tell i am doing everything right

Can anyone eval this code form the page and tell me what they think?

Thanks a whole lot

-----
CODE
-----
<%@ Language=VBScript %>
<!--include file = "ADOVBS.INC"-->
<%

'Dim Conn
'Dim Rst

Set Conn = server.CreateObject("ADODB.Connection")
Set Rst = server.CreateObject("ADODB.Recordset")

Conn.Open "test6a"
'open RST connection
Rst.ActiveConnection = Conn

Rst.Source = "Products"
Rst.Open

'add new record

'----line 20
Rst.AddNew "Products"
Rst("Category")=Request.Form("Category")
Rst("ProductName")=Request.Form("Name")
Rst("Description")=Request.Form("Description")
Rst("Price")=Request.Form("Price")
Rst.Update

'close
Rst.Close
set Rst=nothing
Conn.Close
set Conn=nothing

Response.Redirect "ViewProd.asp"

%>