Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Error_please help

Author  Topic 

amy
Starting Member

30 Posts

Posted - 2002-06-19 : 14:18:51
what is the meaning of this error:

Microsoft OLE DB Provider for SQL Server error '80040e21'

Multiple-step OLE DB operation generated errors. Check each OLE DB status
value, if available. No work was done.

my code:
========
<%@ Language=VBScript %>

<%
response.expires=-1
Dim conn
Dim strconn
Dim Rs
Dim strID

'command for connection to sql database
strconn = "Provider=SQLOLEDB;Data Source=sc48a5b\dev2sql2000;Initial Catalog=personnel;User Id=nn;Password=nn"

Set conn =Server.CreateObject ("ADODB.Connection")
conn.open strconn

set rs = server.createobject("ADODB.recordset")
if CStr(Request.Form("AnoucementType")) ="4" Then
rs.open "Vacancy", conn, 2,2
elseif CStr(Request.Form("AnoucementType")) <> "4" Then
rs.open "VacancyRB", conn, 2,2
end if
'Use the addnew method of the recordset object to add a record
rs.addnew

rs("AnoucementType") = request("AnoucementType")
rs("RelatedGroup") = request("RelatedGroup")
rs("Staffingspecialist") = request("Staffingspecialist")
rs("Staffingassistant") = request("Staffingassistant")
rs("Team") = request("Team")
rs("DateSF52receive") = request("DateSF52receive")
rs("DateVASINopen") = request("DateVASINopen")
rs("DateVAclosed") = request("DateVAclosed")
rs("DateSINclosed") = request("DateSINclosed")
rs("Seriesgrade") = request("Seriesgrade")
rs("Orgcode") = request("Orgcode")
rs("PDNumber") = request("PDNumber")
rs("Bilingual") = request("Bilingual")
rs("Speak") = request("Speak")
rs("Remarks") = request("Remarks")

rs.movelast
strID=rs("VacancyID")

%>
<!--- Display the information --->
Thank you for....<br>
Your Vancay ID number is <%=strID%>
<table border="1">
<tr>
<td>Announcement Number</td>
<td><%=request("AnoucementType")%></td>
</tr>
<tr>
<td>Alpha Characters </td>
<td><%=request("RelatedGroup")%></td>
</tr>
<tr>
<td>Staffing Specialist</td>
<td><%=request("staffingspecialist")%></td>
</tr>
<tr>
<td>Staffing Assistant</td>
<td><%=request("staffingassistant")%></td>
</tr>
<tr>
<td>Team</td>
<td><%=request("team")%></td>
</tr>
<tr>
<td>Date SF-52 Received</td>
<td><%=request("DateSF52receive")%></td>
</tr>
<tr>
<td>Date VA/SIN Opened</td>
<td><%=request("DateVASINopen")%></td>
</tr>
<tr>
<td>Date VA Closed</td>
<td><%=request("DateVAclosed")%></td>
</tr>
<tr>
<td>Date SIN closed</td>
<td><%=request("DateSINclosed")%></td>
</tr>
<tr>
<td>Series/Grade Posted</td>
<td><%=request("seriesgrade")%></td>
</tr>
<tr>
<td>Org Code</td>
<td><%=request("orgcode")%></td>
</tr>
<tr>
<td>Suffix </td>
<td><%=request("txtSerial1")%></td>
</tr>
<tr>
<td>PD</td>
<td><%=request("PDNumber")%></td>
</tr>
<tr>
<td>Bilingual</td>
<td><%=request("Bilingual")%></td>
</tr>
<tr>
<td>Language</td>
<td><%=request("Speak")%></td>
</tr>
<tr>
<td>Remarks</td>
<td><%=request("Remarks")%></td>
</tr>
</table>


<%
set rs Nothing
Set conn = Nothing

%>



robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-06-19 : 14:30:52
Um, it would help if you gave some indication as to which line generated the error.

My first thought is that you perform an rs.AddNew without doing an rs.Update, and then perform an rs.MoveLast, and THEN perform a "Set rs=Nothing" without performing an rs.Close or conn.Close (the fact that it happens automatically doesn't mean you shouldn't do it explicitly)

Go to Top of Page

amy
Starting Member

30 Posts

Posted - 2002-06-19 : 14:47:53
Thanks

The thing is I have that code on my machine then it work fine, but I gave it to my co-worker then it not work and that the error and it point to line: rs("RelatedGroup") = request("RelatedGroup")



Go to Top of Page
   

- Advertisement -