Results 1 to 3 of 3

Thread: Exception occurred

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Posts
    100

    Exception occurred

    Hi all.
    I got this error when I run the page on localhost.

    Error Type:
    Error Type:
    (0x80020009)
    Exception occurred.
    /biotec_dwnstairs/sokongan_senarai.asp, line 8


    Below is the portion of my code.
    The commented shows line 8 where the error is.

    VB Code:
    1. <%
    2.     set gpermohonan = server.CreateObject("adodb.recordset")
    3.     gpermohonan.open " SELECT * FROM permohonan WHERE sokong IS NULL and jpk = 1 ",conn
    4.     set gstaf = server.CreateObject("adodb.recordset")
    5.     gstaf.open "SELECT * FROM staf WHERE id='"&gpermohonan("id")&"'" ,conn 'line 8
    6. %>

    Why the error occur?
    Can anyone help me correct the error?
    Thanks in advance.

  2. #2
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: Exception occurred

    Did you try putting proper spaces in between
    VB Code:
    1. gstaf.open "SELECT * FROM staf WHERE id='" & gpermohonan("id") & "'" , conn
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  3. #3
    Member
    Join Date
    Mar 2006
    Posts
    55

    Re: Exception occurred

    Do you get a value if you response.write gpermohonan("id") after the first sql query (you can just throw in a response.end after it to stop the second query throwing up an error while you debug)? If so I'd probably try running that query through the sql server to see what it returns there.

Posting Permissions

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



Click Here to Expand Forum to Full Width