Solved

error '800a01b6'

Posted on 2001-06-06
5
534 Views
Last Modified: 2012-05-05
hi

I am having this error
ADODB.Recordset error '800a01b6'

Object doesn't support this property or method

/magazine/admin/pub1.asp, line 20

the line 20 states as follows :

call rs.Update("Description",Request.Form("textarea1"))

the code is as follows :

db = Application("Connection1_ConnectionString")

Set dbGlobalWeb = Server.CreateObject("ADODB.Connection")
dbGlobalWeb.Open(db)


SQL="SELECT * from groupe where id = 3 "

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open SQL, db, 3,3

call rs.Update("Description",Request.Form("textarea1"))
call rs.Update("title",Request.Form("button"))

rs.Close()


Note that it is used to work on my server (NT4.0 IIS 4.0) now it is not working on my HOST server

Please advice
0
Comment
Question by:zeon1234
5 Comments
 
LVL 20

Accepted Solution

by:
Silvers5 earned 30 total points
Comment Utility
update your mdac..
http://www.microsoft.com/data/download.htm

 if the db is access you'll need to give write permissions

also try to change your conn string to:

rs.Open SQL, db, 1,3


0
 
LVL 2

Expert Comment

by:kmv
Comment Utility
I agree with Silvers5 about recordset open parameters.
You'd better use 1 (adOpenKeyset) instead 3 (adOpenStatic)
But I like to use next way:
<%
function formatSqlText(value)
  formatSqlText="'"&Replace(value, "'", "''")&"'"
end function


SQL="UPDATE groupe SET Description = "&formatSqlText(Request.Form("textarea1"))&", title = "&formatSqlText(Request.Form("button"))&" where id = 3 "

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open SQL, db, 3,3

rs.Close()
%>
It is more effective than force ADO to create update automatically. Spend little time to read about Update and Insert SQL clauses. I think you'll get less problems using them and will create more efficient code.
formatSqlText function will change text entered by user to safe one.
0
 
LVL 2

Expert Comment

by:kmv
Comment Utility
And possible it is better to use
rs.Open SQL, dbGlobalWeb, 3,3
instead of
rs.Open SQL, db, 3,3

ADO will create connection object automatically in your code so it is better thay you either do not create dbGlobalWeb object or use it in your code.
0
 

Expert Comment

by:bradlkm
Comment Utility
This may be a fairly simplistic answer, but it is possible that you get the error because your request.form("textarea1") is null, and several times, even if a database field allows a null value, it will not allow you to do this.

I suggest either validating the input for textarea1, or even better:

call rs.Update("Description",Request.Form("textarea1") & "")

The addition of &"" will make a null string an empty string, and it can then be stored.

HTH,

Kevin

0
 

Expert Comment

by:alortiz
Comment Utility
If it used to work in the server you had before, maybe it has to do with the ODBC data source, check that it connects propperly, and that the user info in it grants read/write access.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Translate a cURL request to Classic ASP 4 345
Visual Project Bridge error 5 56
UTC (timezone) without using an API 16 27
Time/Date Query 11 33
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now