HELP! error: ADODB.Recordset error '800a0cc1'

Hi guys,

Need some help. I’m trying to insert data into two tables with one form. I’m also retrieving a @@IDENTITY for the corr table. I’m getting the following error:

ADODB.Recordset error ‘800a0cc1’

Item cannot be found in the collection corresponding to the requested name or ordinal.

/MultiASP/insertc.asp, line 27

Here’s the code, the line in bold is where I get the error

<% If Request("SubmitButton") <> "" Then %>
 
<%
Dim postSubject
Dim postText
Dim cInsert
 
postSubject = Request.form("postSubject")
postText = Request.Form("PostText")
 
set cInsert = Server.CreateObject("ADODB.Command")
cInsert.ActiveConnection = MM_multiasp_STRING
cInsert.CommandText = "INSERT INTO tabPost (postSubject, PostText) VALUES ('" & postSubject & "','" & postText & "')"
 
 
Dim rsIdentity
Set rsIdentity = cInsert.Execute("SELECT @@IDENTITY FROM tabPost")
 
Dim iCurrentValue
**iCurrentValue = rsIdentity(0)**
 
rsIdentity.Close
Set rsIdentity = Nothing
 
cInsert.Close
Set cInsert = Nothing
 
%>
<%
Dim imageSource
Dim cInsert2
 
imageSource = Request.Form("ImageSource")
 
set cInsert2 = Server.CreateObject("ADODB.Command")
cInsert2.ActiveConnection = MM_multiasp_STRING
 
cInsert2.CommandText = "INSERT INTO tabImages (ImageSource, PostID) VALUES ('" & imageSource & "'," & iCurrentValue & ")"
cInsert2.CommandType = 1
cInsert2.CommandTimeout = 0
cInsert2.Prepared = true
cInsert2.Execute()
 
%>
 
<% End If %>