PDA

View Full Version : Microsoft VBScript runtime error '800a01b6'


help
05-22-2003, 08:36 AM
hi,

I am working on a guestbook, and I am getting the following error.

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'Request.Form(...).name'

<%
Set CN=server.createobject("ADODB.Connection")
CN.Open"guests"

Sql = "Select * from Guestbook"
Set record = server.createobject("ADODB.Recordset")
record.open Sql,cn,2,2
record.AddNew
record.name = Request.Form("name")
record.email = Request.Form("email")
record.URL = Request.Form("URL")
record.message = Request.Form("message")
record("todaysDate") = Now()
record.update
record.close
Set record = nothing
Set CN = nothing
%>

Thanks in advance.

Angelika
05-22-2003, 10:21 AM
Tyr this code:
<%
Set CN=server.createobject("ADODB.Connection")
CN.Open"guests"
Set record = server.createobject("ADODB.Recordset")

Sql = "Select * from Guestbook"
record.open Sql,CN,3,3
record.AddNew
record("name")= Request.Form("name")
record("email")= Request.Form("email")
record("URL")= Request.Form("URL")
record("message")= Request.Form("message")
record("todaysDate")= Now()
record.update
record.close
Set record = nothing
Set CN = nothing
%>

Terry
05-22-2003, 10:33 AM
Originally posted by help
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'Request.Form(...).name'


You may need an updated MDAC. Something else you can try is to get the value of your form fields first then use that value in your add.new

ie

near the top of your code section:
var_name = request.form("name")

then in your add:
record("name") = var_name

EDIT: Just noticed Angelika's post after posting mine. Try her suggestion as well.

help
05-22-2003, 11:27 AM
Thanks Angelika and Terry. My code works now.