![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I tried DTS and SSIS both. But it seems there's no way to import data from a web page. Basically, my client has a php page on their server. I can access the file by using an URL (for example http://myclient/page.php?id=56). And this will return a XML file. in SSIS, i can easily import a XML file on my local system, match the columns and import it into my database. But how can i do it while its on the web? (I have tried the HTTP connection manager, but it seems it's for web service only) |
#3
| |||
| |||
|
|
I tried DTS and SSIS both. But it seems there's no way to import data from a web page. Basically, my client has a php page on their server. I can access the file by using an URL (for example http://myclient/page.php?id=56). And this will return a XML file. in SSIS, i can easily import a XML file on my local system, match the columns and import it into my database. But how can i do it while its on the web? (I have tried the HTTP connection manager, but it seems it's for web service only) |
#4
| |||
| |||
|
|
I have tested the code below, and it works in the Script Task. You then need to add the Data Flow task after this task, then add XML Source. For the Data Access mode, choose XML data from variable, and specify the variable you read the XML into. You need to have a schema. Here it is: Imports System Imports System.Data Imports System.Math Imports Microsoft.SqlServer.Dts.Runtime Imports System.Xml Public Class ScriptMain Public Sub Main() Dim xmlDoc As XmlDataDocument, strXML As String xmlDoc = New XmlDataDocument xmlDoc.Load("http://localhost/MyXMLFile.xml") strXML = CType(xmlDoc.InnerXml, String) Dts.Variables("strXMLData").Value = strXML Dts.TaskResult = Dts.Results.Success End Sub End Class "Alcibiades (AT) gmail (DOT) com" wrote: I tried DTS and SSIS both. But it seems there's no way to import data from a web page. Basically, my client has a php page on their server. I can access the file by using an URL (for example http://myclient/page.php?id=56). And this will return a XML file. in SSIS, i can easily import a XML file on my local system, match the columns and import it into my database. But how can i do it while its on the web? (I have tried the HTTP connection manager, but it seems it's for web service only) |
![]() |
| Thread Tools | |
| Display Modes | |
| |