Solved

error '800a01b6'

Posted on 2001-06-06
5
535 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
ID: 6159025
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
ID: 6159060
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
ID: 6159070
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
ID: 6160761
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
ID: 6161589
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
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…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…
A simple description of email encryption using a secure portal service. This is one of the choices offered by The Email Laundry for email encryption. The other choices are pdf encryption which creates an encrypted pdf of your email and any attachmen…

911 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

19 Experts available now in Live!

Get 1:1 Help Now