Problem with the component created in VB for ASP

Ask a Question related to ASP Components, Design and Development.

  1. #1

    Default Problem with the component created in VB for ASP

    Hello friends!

    I just created a component in VB which when a user enters username and
    password when clicked will validate and redirect him to a page.

    I am getting an error: This is my asp page "Object variable or with
    block variable not set"

    <%
    dim obj
    set obj=server.createObject("tproject.tclass")

    obj.GetResponse()

    %>

    and below is my class file of the dll

    Public Conn As clsDB
    Public objContext As ObjectContext
    Public objResponse As response
    Public objRequest As request

    Public Sub authuser()
    Set objContext = GetObjectContext()
    Set objResponse = objContext("Response")
    Set objRequest = objContext("Request")

    Dim loginrs As New ADODB.Recordset


    sql = "select * from B_LMT where user_name='" &
    objRequest("txtusername") & "' and user_pw='" & objRequest("txtpwd") &
    "'"
    Set loginrs = Conn.DBQuery(sql)

    If Not loginrs.EOF Then
    'If Startcomp(objRequest("txtusername"), "U_NAME") And
    Startcomp(objRequest("txtpwd"), "U_PWD") Then
    objResponse.Redirect "index.asp"

    End If

    End Sub
    vals Guest

  2. Similar Questions and Discussions

    1. Problem using AddHandler for dynamically created WebControls
      I am using the AddHandler statement to add a CheckedChanged event handler to a series of RadioButtons that I create in a loop. However, the handler...
    2. Dynamically created control in Datagrid problem
      I created a datagrid with 4 bound columns and 1 template column. I am using the ITEMDATABOUND event to add a control to the template column, if...
    3. Updating to OS 10.2.8 created an AI 10.0.3 problem.
      I just upgraded my Mac G4 (AGP Graphics) to OS 10.2.8 and I have a problem with AI 10.0.2. Everytime I start it up, I get a dialog box that states "...
    4. Problem with Eventhandlers dynamicly created MobileControls
      Hellow, I have this peace of code from an ASP.NET page for a Mobile device, but i have a small problem. In this first SUB I dynmamicly create a...
    5. problem with name created when control is rendered.
      Hello, I am creating a html server control that is in a datalist. I need to access this controls value on the client via javascript but the name...
  3. #2

    Default Re: Problem with the component created in VB for ASP


    "vals" <vallury@vallury.com> wrote in message
    news:4f02d8b5.0404190329.4e72c923@posting.google.c om...
    > Hello friends!
    >
    > I just created a component in VB which when a user enters username and
    > password when clicked will validate and redirect him to a page.
    >
    > I am getting an error: This is my asp page "Object variable or with
    > block variable not set"

    does your GetObjectContext()
    run within COM+ context? ie, did your register your VB class in the COM+
    console?

    --
    compatible web farm Session replacement for Asp and Asp.Net
    [url]http://www.nieropwebconsult.nl/asp_session_manager.htm[/url]

    Egbert Nierop \(MVP for IIS\) Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139