ASP: 'request'-object is unknown

Discussion in 'ASP General' started by spacecake, Mar 4, 2004.

  1. spacecake

    spacecake Guest

    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>
     
    spacecake, Mar 4, 2004
    #1
    1. Advertising

  2. spacecake

    Ray at Guest

    Re: 'request'-object is unknown

    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

    "spacecake" <> wrote in message
    news:...
    > 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>
     
    Ray at, Mar 4, 2004
    #2
    1. Advertising

  3. spacecake

    spacecake Guest

    Re: 'request'-object is unknown

    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
     
    spacecake, Mar 5, 2004
    #3
  4. spacecake

    Evertjan. Guest

    Re: 'request'-object is unknown

    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) %>

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Mar 5, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Birtle
    Replies:
    2
    Views:
    2,098
    John Saunders
    Oct 16, 2003
  2. David Levitan

    ObjectInputStream and unknown object

    David Levitan, Mar 16, 2006, in forum: Java
    Replies:
    4
    Views:
    745
  3. Replies:
    3
    Views:
    491
    Fei Liu
    Apr 21, 2006
  4. vishnu
    Replies:
    1
    Views:
    388
    Walter Roberson
    Jul 27, 2007
  5. Vincent Arnoux
    Replies:
    1
    Views:
    259
    Arnaud Bergeron
    Aug 11, 2006
Loading...

Share This Page