ASP: 'request'-object is unknown

S

spacecake

hi, I get an error that the request object is unknown, the owc
pivottable is normally clientside and request.querystring is something
from the serverside, maybe that't the problem... Can anybody help
me???

thx

<html>

<head>
<title>PivotTable Component</title>
<!--#include file="Adovbs.inc"-->
<!--#include file="header.asp"-->

</head>

<body>

<!-- PivotTable Control -->
<object classid="clsid:0002E520-0000-0000-C000-000000000046"
id="PivotTable1" width="450" height="300">
</object>


<script language=VBScript>

Dim sSQL
Dim sConn
Dim item
Dim c
Set c = PivotTable1.Constants


PivotTable1.AutoFit = True
PivotTable1.AllowDetails = False
PivotTable1.DisplayFieldList = false

' Specify the SELECT criteria
sSQL = "select * from alles"

'Specify the connection string
sConn = "Provider=SQLOLEDB; Data Source = bew2vachach01; Initial
Catalog = finrap; User Id = sa; Password= as"

' Bind the PivotTable to the results of the query
PivotTable1.ConnectionString = sConn
PivotTable1.CommandText = sSQL


' Show all result columns in the report
'PivotTable1.ActiveView.AutoLayout

' Format the numbers
set pview = PivotTable1.ActiveView

'rijen instellen
For teller=1 to request.form("aantal")
rij="rij" & teller
if request.form(rij) <> "" then
pview.RowAxis.InsertFieldSet pview.FieldSets(request.form(rij))
end if
next


</script>

</body>
</html>
 
R

Ray at

If you do a view-source, you'll see that your code shows up in there,
because the code you have is not specified as being server-side code, either
with <% %> or <script RUNAT=SERVER...></script>

Ray at work
 
S

spacecake

I changed my code this way:

For teller=1 to request.form("aantal")
rij="rij" & teller
if <% request.form(rij) %> <> "" then
pview.RowAxis.InsertFieldSet pview.FieldSets(<% request.form(rij) %>)
end if
next

when I run the program I get this error:

Error Type:
Request object, ASP 0102 (0x80004005)
The function expects a string as input.

POST Data:
rij1=manager&aantal=5
 
E

Evertjan.

spacecake wrote on 05 mrt 2004 in
microsoft.public.inetserver.asp.general:
I changed my code this way:

For teller=1 to request.form("aantal")
rij="rij" & teller
if <% request.form(rij) %> <> "" then
pview.RowAxis.InsertFieldSet pview.FieldSets(<%
request.form(rij) %>)
end if
next

when I run the program I get this error:

Error Type:
Request object, ASP 0102 (0x80004005)
The function expects a string as input.

POST Data:
rij1=manager&aantal=5

Faulty code

request.form("aantal") shows you are in serverside ASP,
then you start ASP by <% request.form(rij) %>

Mixing serverside and clientside code will never work.

Probeer je code netjes te scheiden.

===============================================

btw:

Even if you were in a clientside HTML part of your code,
<% request.form(rij) %> would not give any output,
should be <% = request.form(rij) %>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top