SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    Non-Member
    Join Date
    Aug 2007
    Posts
    494
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MSXML2.ServerXMLHTTP Object

    Hi all.

    I have this ASP page:

    Code:
    url = "http://www.mypageweb.com/" 
    
    set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") 
    xmlhttp.open "GET", url, false 
    xmlhttp.send "" 
    
    pagetxt = "<xmp>" & CStr(xmlhttp.ResponseText) & "</xmp>"
    
    myArray = split(pagetxt,"<!--A-->")
    part1 = myArray(1)
    myArray = split(part1,"<!--B-->")
    part2 = myArray(0)
    
    RESPONSE.WRITE part2 & "<br>"
    Response.Flush
    I need INSERT INTO tbl mysql the result of this page and write:

    Code:
    for i=0 to myArray(0)
    
    strSQL = "INSERT INTO TBL"
    strSQL = strSQL & " ( "
    strSQL = strSQL & "  quote "
    strSQL = strSQL & " )"
    strSQL = strSQL & "  VALUES"
    strSQL = strSQL & " ( "
    strSQL = strSQL & " '" & Replace(part2, "'", "''") & "' "
    strSQL = strSQL & " ) "
    objconn.execute strSQL
    
    response.write strSQL & "<br>"
    
    next
    But I receive this error:

    Errore di run-time di Microsoft VBScript error '800a000d'
    '[string: " <td width="21" bac"]'

    In the line for i=0 to myArray(0)

    Can you help me?

  2. #2
    Non-Member
    Join Date
    Aug 2007
    Posts
    494
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry I wrong Forum...


Bookmarks

Posting Permissions

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