Jump to content

Its saying I got no record even though there is a record?


prichardson

Recommended Posts

I get this error: ADODB.Field error '800a0bcd' record is thereHowever I have record in the database table.The process goes:I want to add data into two tables. 1st table data is inserted correctly into the table and close the insert. Then a recordset that gets a variable which is defined to be able to find the ID of the recors that was just inserted. This then followed by opening and inserting the ID from that record and other fields into the second table.The data including the ID in the first table is correct. The problem is that it is not being inserted into the second table, even though the data is there - ID is there.The really annoying thing is that the yesterday i had this working not once but i tested it many times. Furthermore I did it for several pages with them all working. But today I went on to do this for some other pages but i got this error. Even worse is that i checked the ones that worked and now they are not working - giving me the same error. Why would it work yesterday and not today!Here is the code:<!--#include file="../../assets/ssi/functions/Full_Date_and_Time.asp" --><%dim strRequestIDstrRequestID = strFullTodayDate%><%'**** enter record in database ***********************dim rsEnterRecordSet rsEnterRecord = Server.CreateObject("ADODB.Recordset")rsEnterRecord.Open "xxx_xxx", MM_connCM001_STRING,1, 2rsEnterRecord.AddNew ' create a new record rsEnterRecord("SearchID") = strRequestIDrsEnterRecord("Home_Page") = strRequestHomePagersEnterRecord("Press_Archive") = strRequestPressArchiversEnterRecord.UpdatersEnterRecord.Close'*****************************************************%>'**************** RECORD SET FOR THE SECOND TABLE ******<%dim rsInsert_PressID_Into_Search_IDsset rsInsert_PressID_Into_Search_IDs = Server.CreateObject("ADODB.Recordset")rsInsert_PressID_Into_Search_IDs.ActiveConnection = MM_connCM001_STRINGrsInsert_PressID_Into_Search_IDs.Source = "SELECT PressID FROM xxxx WHERE SearchID = '" + strFullTodayDate + "'"rsInsert_PressID_Into_Search_IDs.CursorType = 3rsInsert_PressID_Into_Search_IDs.CursorLocation = 2rsInsert_PressID_Into_Search_IDs.LockType = 1rsInsert_PressID_Into_Search_IDs.Open()%><%dim strPressIDstrPressID = (rsInsert_PressID_Into_Search_IDs.Fields.Item("PressID").Value)rsInsert_PressID_Into_Search_IDs.Close()Set rsInsert_PressID_Into_Search_IDs = Nothingdim rsEnterRecord2Set rsEnterRecord2 = Server.CreateObject("ADODB.Recordset")rsEnterRecord2.Open "xxxx_xxx", MM_connCM001_STRING,1, 2rsEnterRecord2.AddNew ' create a new recordrsEnterRecord2("SearchID") = strFullTodayDatersEnterRecord2("PressID") = strPressIDrsEnterRecord2.UpdatersEnterRecord2.CloseResponse.Redirect "index.asp"End If 'If Request.Form("Active") = "True"%>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...