ASP file in InterDev can't "Start" as VBP file in VisualBasic?

Discussion in 'ASP General' started by Alont, May 5, 2004.

  1. Alont

    Alont Guest

    so how I can test asp code as I test VB project?
    the function such as "start","step into",etc. all can't use when I
    edit asp file, InterDev can't "Start" asp file?
    the IE give me such a simple error report:
    error type:
    Microsoft VBScript ÔËÐÐʱ´íÎó (0x800A01C2)
    /FindMerchant/search.asp,Line19
    the line 19 is: rsResult=search(strKeyword)

    <%
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.open strPath
    dim rsResult
    set rsResult = Server.Createobject("ADODB.recordset")

    rsResult=search(strKeyword)
    %>
    <%
    Function Search(keyword) 'keywordÀïµÄ¹Ø¼ü×ÖÓÿոñ·Ö¿ª

    Dim sqlQuest
    Dim keywordGroup
    dim rs
    set rs= server.createobject("ADODB.Recordset")
    keywordGroup = Split(keyword)
    '°ÑkeywordÀïµÄ¹Ø¼ü×ÖÒÔ¿Õ¸ñ×ö·Ö¸î·û×°µ½Êý×éÀï,
    keyword = "" '×¼±¸ÓÃÀ´×°¾­´¦ÀíºóµÄkeyword
    Dim i

    For i = 0 To UBound(keywordGroup)
    '¸øÿ¸ö¹Ø¼ü×Ö¼ÓÉÏÌØÊâ·ûºÅÐγÉSQLÓï·¨
    keywordGroup(i) = "'%" & keywordGroup(i) & "%'"
    Next

    For i = 0 To UBound(keywordGroup) '×éºÏ¾­´¦ÀíºóµÄ¹Ø¼ü×Ö
    If keyword = "" Then
    keyword = keywordGroup(i)
    Else
    keyword = keywordGroup(i) & "and" & keyword
    End If
    Next

    sqlQuest = "Select Tel,Address From tableMerchant Where
    Commodity LIKE " & keyword
    rs.Open sqlQuest, conn
    Dim a
    Do While Not rs.EOF
    a = a & rs.Fields.Item("Tel") & rs.Fields.Item("Address") &
    ";"
    rs.MoveNext
    Loop
    rs.Close
    Search =rs
    conn.Close

    End Function
    %>

    I'm sorry my english is so poor,
    so forgive me if my word had make you uncomfortable.
    I'll try my best to express my question correctly
     
    Alont, May 5, 2004
    #1
    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. Jordan Marton
    Replies:
    0
    Views:
    430
    Jordan Marton
    Jul 28, 2003
  2. Jordan Marton
    Replies:
    0
    Views:
    341
    Jordan Marton
    Jul 29, 2003
  3. darrel
    Replies:
    2
    Views:
    408
    Mark Fitzpatrick
    Aug 19, 2004
  4. darrel
    Replies:
    0
    Views:
    403
    darrel
    Aug 19, 2004
  5. David P. Donahue

    Latest Microsoft.VisualBasic.dll?

    David P. Donahue, Oct 4, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    1,872
    David P. Donahue
    Oct 5, 2004
Loading...

Share This Page