codice:
<%
Dim URL
URL = "http://summitfeed.co.uk/three/three-affil.txt"
Dim objXMLHTTP
Set objXMLHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP")
objXMLHTTP.Open "GET", URL, False
objXMLHTTP.Send
IF objXMLHTTP.statusText = "OK" THEN
txtFile = objXMLHTTP.responseText
END IF
'*** Clean up!
Set objXMLHTTP = nothing
Dim rows, i, columns, i2, sSQL, sConnString
rows = Split(txtFile, vbCrLF)
sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("db1.mdb")
Set connection = Server.CreateObject("ADODB.Connection")
connection.Open(sConnString)
sSQL1 = "INSERT into XXXXXXX (ProductCode, Manufacturer, Model, ProductName, Category, ShortDescription, LongDescription, ProductPageURL, SmallImageURL, LargeImageURL, PriceGBP, StockAvailability, DeliveryperiodDays, PromotionalLineRental, PromotionalPeriod, FullPriceLineRental, Network, Tariff) values"
For x = 0 to Ubound(rows)
columns = Split(rows(x), vbTAB)
sSQL2 = " ('" & columns(0) & "', '" & columns(1) & "', '" & columns(2) & "', '" & columns(3) & "', '" & columns(4) & "', '" & columns(5) & "', '" & columns(6) & "', '" & columns(7) & "', '" & columns(8) & "', '" & columns(9) & "', '" & columns(10) & "', '" & columns(11) & "', '" & columns(12) & "', '" & columns(13) & "', '" & columns(14) & "', '" & columns(15) & "', '" & columns(16) & "', '" & columns(17) & "')"
sSQL = sSQL1 & sSQL2
connection.execute(sSQL)
Next
connection.Close
Set connection = Nothing
%>
Grazie