Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

error '800a01b6'

Posted on 2001-06-06
5
Medium Priority
?
542 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:
Michel Sakr earned 120 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

670 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