Reading information on a website

tvandongentvandongen Member Posts: 78
edited 2003-03-06 in Navision Financials
I've made a small report to check if the VAT number is correct, using an EU database:

(Report --> On after get record of the relation tabel)

LinkTxt:='http://europa.eu.int/comm/taxation_customs/vies/cgi-bin/viesquer?MS='+
DELCHR(COPYSTR(Relatie."BTW-nummer",1,2))+'&VAT='+
DELCHR(COPYSTR(Relatie."BTW-nummer",3))+'&Lang=NL';
HYPERLINK(LinkTxt);

Although this solution is working, you can only run it one at a time, because the information has to be read on the screen.

Does anybody know a way to save the resulting website, so I can convert the answer from a saved to file back to Navision Financials 2.60 ?

Comments

  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    I know how to do this in a ASP-page; then you use eg. the Microsoft.XMLHTTP or AspTear component to grab the data into a string. Then you can parse this string to extract the info you need.

    Here is an example (from http://www.4guysfromrolla.com/webtech/071199-1.shtml):
    'AspTear constants
    Const Request_POST = 1
    Const Request_GET = 2
    
    Set objTear = CreateObject("SOFTWING.ASPtear")
    Response.ContentType = "text/html"
    
    On Error Resume Next
    
    Dim strRetval
    ' URL, action, payload, username, password
    strRetval = objTear.Retrieve("http://www.stockquotes.com/msft.asp", Request_GET, "", "", "")
    
    If Err.Number <> 0 Then
         Response.Write "<b>"
         If Err.Number >= 400 Then
             Response.Write "Server returned error: " & Err.Number
         Else
             Response.Write "Component/WinInet error: " & Err.Description
         End If
         Response.Write "</b>"
    Response.End
    End If
    
    Response.Write "Microsoft currently selling at " & FormatCurrency(strRetval, 2)
    

    I have no idea if you can call these components directly from Navision. If not, you need to write a OCX that calls the component, and you call that OCX from Navision.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • tvandongentvandongen Member Posts: 78
    Luc,

    Thanks for your reply, but I've found an easier solution by opening the site in Excel in stead of the internet explorer.

    It is now working fine.
Sign In or Register to comment.