Solved

error '800a01b6'

Posted on 2001-06-06
5
538 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Issues with Insert statement 12 29
Index on a Table 6 30
SP result not being displayed 5 35
Can't select treeview node from iframe 2 31
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
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…

680 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