Solved

Error: Server name or address could not be resolved

Posted on 2007-03-25
16
3,394 Views
Last Modified: 2007-11-27
Hi: Can any one please tell me how to i fixed that error:
Error Type:
msxml3.dll (0x80072EE7)
The server name or address could not be resolved
/Deceased.asp, line 31
-----------------------------------------------------------------------------
Const ForAppend = 8
Dim objFSO: Set objFSO=CreateObject("Scripting.FileSystemObject")
Dim DBConn,rs,social,vpath,vfile,xLine
Dim WShell
Set WShell = CreateObject("wscript.shell")
vPath = WShell.SpecialFolders("MyDocuments") & "\"
vFile = vPath & "Deceased-Information-"
vFile = vFile & year(now) & month(now) & day(now) & "-"
vFile = vFile & hour(now) & minute(now) & second(now) & ".txt"
Set DBConn = CreateObject("ADODB.Connection")
DBConn.Open "Provider=MSDASQL.1;Persist Security Info=False;Data Source=dec1"
sSQL = "select name1,ssn1 from dbtr where status_code=450"
Set rs = DBConn.Execute(sSQL)
Set objFile = objFSO.OpenTextFile(vfile, ForAppend, True)
Do While Not rs.EOF
            objFile.WriteLine PostURL("http://ssdi.rootsweb.com/cgi-bin/ssdi.cgi", "ssn1=" & social)
            response.write(rs.Fields("ssn1"))
            response.write("<br>")      
            rs.moveNext
loop

Function PostURL(sURL, aPostData)
Dim XmlHTTP

Set XmlHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP")

With XmlHTTP
      .Open "POST", sURL, False
      .setRequestHeader "Content-Type", "application/ x-www-form- urlencoded"
      .send aPostData
      If .Status = 200 Then
            PostURL = .responseText
      Else
            PostURL = "Error!"
      End If
End With
Set XmlHTTP = Nothing

End Function
0
Comment
Question by:mustish1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 8
16 Comments
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 18789759
Does that url reside on the same server and protocol as the current page?
0
 

Author Comment

by:mustish1
ID: 18789773
No but the same program works in VB

Thanks.
0
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 18789781
If you use a URL that doesn't exist, or you are behind a firewall that blocks certain web sites, or the site is behind a firewall that blocks traffic to port 80 / 443, or you are using a proxy server, or the site requires authentication, you will receive this error.

The code may work in Visual Basic on YOUR COMPUTER. But on a third party server this code may not work due to network settings.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

Author Comment

by:mustish1
ID: 18789784
ok but i want to run only on my computer. I am using windows 2000 PRO. Can you please tell me what i do settings in it so that it will run as there is no antivirus or any other thing install on my computer.

Thanks.
0
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 18789794
Is the webserver running on the same computer you tested with in Visual Basic?
0
 

Author Comment

by:mustish1
ID: 18789795
Yes
0
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 18789807
Try adding this line after Set XmlHTTP:

Set XmlHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP")
XmlHTTP.setTimeouts 30000, 30000, 0, 0
0
 

Author Comment

by:mustish1
ID: 18789816
This time no errors but the output file is not created into my document folder. It prints just the deceased Social numbers from the SQL
321127371
322142462
351441270

Thanks.


Const ForAppend = 8
Dim objFSO: Set objFSO=CreateObject("Scripting.FileSystemObject")
Dim DBConn,rs,social,vpath,vfile,xLine
Dim WShell
Set WShell = Server.CreateObject("wscript.shell")
vPath = WShell.SpecialFolders("MyDocuments") & "\"
vFile = vPath & "Deceased-Information-"
vFile = vFile & year(now) & month(now) & day(now) & "-"
vFile = vFile & hour(now) & minute(now) & second(now) & ".html"
Set DBConn = Server.CreateObject("ADODB.Connection")
DBConn.Open "Provider=MSDASQL.1;Persist Security Info=False;Data Source=dec1"
sSQL = "select name1,ssn1 from dbtr where status_code=450"
Set rs = DBConn.Execute(sSQL)
Set objFile = objFSO.OpenTextFile(vfile, ForAppend, True)
Do While Not rs.EOF
            objFile.WriteLine PostURL("http://ssdi.rootsweb.com/cgi-bin/ssdi.cgi", "ssn1=" & social)
            response.write(rs.Fields("ssn1"))
            response.write("<br>")      
            rs.moveNext
loop

Function PostURL(sURL, aPostData)
Dim XmlHTTP

Set XmlHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP")
XmlHTTP.setTimeouts 30000, 30000, 0, 0

With XmlHTTP
      .Open "POST", sURL, False
      .setRequestHeader "Content-Type", "application/ x-www-form- urlencoded"
      .send aPostData
      If .Status = 200 Then
            PostURL = .responseText
      Else
            PostURL = "Error!"
      End If
End With
Set XmlHTTP = Nothing

End Function
0
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 18789862
objFile.WriteLine PostURL("http://ssdi.rootsweb.com/cgi-bin/ssdi.cgi", "ssn1=" & social)

Social isn't defined anywhere? Do you mean this:

objFile.WriteLine PostURL("http://ssdi.rootsweb.com/cgi-bin/ssdi.cgi", "ssn1=" & rs.Fields("ssn1"))
0
 

Author Comment

by:mustish1
ID: 18789878
Ah yes I am sorry its my fault. But it still not creating any text file in my document folder. Is there any other way when i run the program the output wil be print in the browser instead of creating an HTML file in my document folder.

Thanks.
0
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 18789883
Do While Not rs.EOF
            response.write(rs.Fields("ssn1"))
            response.write("<hr>")
            response.write(PostURL("http://ssdi.rootsweb.com/cgi-bin/ssdi.cgi", "ssn1=" & social))
            response.write("<hr><br><br><br>")      
            rs.moveNext
loop
0
 

Author Comment

by:mustish1
ID: 18789889
Thanks. This time its open the web site but its not pulling the records in the web site

Const ForAppend = 8
Dim objFSO: Set objFSO=CreateObject("Scripting.FileSystemObject")
Dim DBConn,rs,social,vpath,vfile,xLine
Dim WShell
Set WShell = Server.CreateObject("wscript.shell")
Set DBConn = Server.CreateObject("ADODB.Connection")
DBConn.Open "Provider=MSDASQL.1;Persist Security Info=False;Data Source=dec1"
sSQL = "select name1,ssn1 from dbtr where status_code=450"
Set rs = DBConn.Execute(sSQL)
Do While Not rs.EOF
   response.write(rs.Fields("ssn1"))
   response.write("<hr>")
   response.write(PostURL("http://ssdi.rootsweb.com/cgi-bin/ssdi.cgi", "ssn1=" & social))
   response.write("<hr><br><br><br>")      
   rs.moveNext

loop

Function PostURL(sURL, aPostData)
Dim XmlHTTP

Set XmlHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP")
XmlHTTP.setTimeouts 30000, 30000, 0, 0

With XmlHTTP
      .Open "POST", sURL, False
      .setRequestHeader "Content-Type", "application/ x-www-form- urlencoded"
      .send aPostData
      If .Status = 200 Then
            PostURL = .responseText
      Else
            PostURL = "Error!"
      End If
End With
Set XmlHTTP = Nothing

End Function
0
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 18789894
>>This time its open the web site but its not pulling the records in the web site

What exactly do you mean? What is the output?
0
 

Author Comment

by:mustish1
ID: 18789907
Can you please check the output files. One is correct and one is wrong. It print the wrong output file.

http://www.ee-stuff.com/Expert/Upload/viewFilesQuestion.php?qid=22471351

Thanks.
0
 
LVL 19

Accepted Solution

by:
BrianGEFF719 earned 500 total points
ID: 18789921
It's doing that because the form element name is ssn and not ssn1.


response.write(PostURL("http://ssdi.rootsweb.com/cgi-bin/ssdi.cgi", "ssn=" & social))
0
 

Author Comment

by:mustish1
ID: 18789938
Thanks Brian
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Adding Row and Cell on a table 14 32
Html form and modal / img src -problem 3 60
Asp in server side with Mssql Server 7 4 43
send email part1 9 53
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question