Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 27th, 2008, 10:38 AM
Authorized User
 
Join Date: Jul 2007
Posts: 24
Thanks: 1
Thanked 0 Times in 0 Posts
Default ADODB.Recordset (0x800A0CB3)

Sir, this code is running perfectly fine at server level, but when we run this code locally in IIS Server then it return following error in the code specified...

Error:
ADODB.Recordset (0x800A0CB3)
Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.



Code:
Set Conn=server.CreateObject("ADODB.Connection")
Conn.ConnectionString="PROVIDER = MICROSOFT.JET.OLEDB.4.0;DATA SOURCE = " & server.mappath("data.mdb")
Conn.open

Dim strSQL,objrs,maxno

strSQL="select max(Par.ParNumber) as qno from Par ;"
Set objrs = Server.CreateObject("ADODB.Recordset")
objrs.open strSQL,Conn,3,3

if not objrs.eof =true and not objrs.bof=true then
maxno=objrs("Qno")
if maxno = "" or vartype(maxno) = 1 then
maxno =1
else
maxno=maxno+1
end if
else
maxno=1
end if

strSQL="select * from Par;"
set objrs=Server.createObject("ADODB.Recordset")
objrs.open strSQL,Conn,3,3

dim strparno,strdate,strroute,strcable,strmap,strPrior ity,strauthor,strFeat,strDatatype,strQues,strsol,s trAttach,strgrid
dim strpartype,strprob,strstat,subj,mailbody,strdep,st rver
dim strloc
'strParno=Request.Form("parno")
strdate=Request.Form("pardate")
strmode = Request.Form("mode")
strtask = Request.Form("task")
strarea=Request.Form("area")
strmap=Request.Form("map")
strPriority=Request.Form("priority")
strauthor=Request.Form("author")
strFeat=Request.Form("feature")
strprob=Request.Form("problem")
strloc = Request.Form("location")
strQues=Request.Form("question")
strsol=Request.Form("solution")
strdep=Request.Form("dept")
strVer=request.form("version")



objrs.AddNew
objrs("ParNumber")= Trim(maxno)
objrs("DateOfQuestion")= trim(strdate)
objrs("mode")=trim(strmode)
objrs("task")=trim(strtask)
objrs("area")=trim(strarea)
objrs("Mapno")=Trim(strmap)
objrs("Priority")=trim(strPriority)
objrs("AuthorOfQuestion")=trim(strauthor)
objrs("Objects")=trim(strFeat)
objrs("problem_type") = trim(strprob)
objrs("Location")=trim(strloc)
objrs("Question")=trim(strQues)
objrs("ProposedSolution")=trim(strsol)
objrs("toolversion")=trim(strVer)
objrs("department")=trim(strdep)

if session("accLevel") = "Client" then
objrs("status")="At IEL"
subj ="New Tool Problem " & MAXNO & " related to " & strFeat & " has been posted by " & strdep & " ."
mailbody = "TA PAR " & MAXNO & " has been posted by TELEATLAS."
sendmail "At IEL",strmode,mailbody ,subj,strFeat,strVer,strprob,strQues,"x"
elseif session("accLevel") = "Administrator" then
objrs("status")="Open"
subj ="New Tool Problem " & MAXNO & " related to " & strFeat & " has been posted by " & strdep & " . "
mailbody = "New Tool Problem " & MAXNO & " has been posted by " & strdep & " ."
sendmail "At TA",strmode,mailbody ,subj,strdep,strFeat,strVer,strprob,strQues,"x"

else
objrs("status")="Open"
end if
'strstat = objrs("status")

objrs.Update

 
Old June 27th, 2008, 08:10 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Well, it's really really bad code, anyway.

Read here to see why:
http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=79

See especially the part that starts with "**BAD CODE**".

But you really should consider using SQL INSERT instead of ADDNEW. Or that variant of ADDNEW that I show at the very end of that FAQ.
 
Old June 27th, 2008, 09:31 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Old Pedant,

Your site is having problems. That link shows 500 Internal Server Error.

Don't code in classic at all anymore but when I did I never used the AddNew method, always had problems with it. I agree with you, INSERT is the way to go.

Richard

 
Old June 28th, 2008, 01:38 AM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Not my site...4GuysFromRolla. Typical of internet.com, plus of course the site is slowly dying.

It will appear again, no doubt, after a while.





Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Recordset error lance Wrox Book Feedback 2 February 23rd, 2007 02:37 PM
ADODB.RecordSet -- Error nabeeljohn Classic ASP Professional 10 November 9th, 2006 05:23 AM
ADODB Recordset sporkman43 Classic ASP Basics 4 November 9th, 2006 04:51 AM
ADODB.Recordset (0x800A0CB3)Current Recordset does tks_muthu Classic ASP Databases 0 June 16th, 2005 07:22 AM
How to get adodb.record from adodb.recordset John Pennington Pro VB Databases 1 November 20th, 2004 06:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.