Solved

error '800a01b6'

Posted on 2001-06-06
5
539 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

734 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