LoginPage

Login page

Simple Login Page

Username Password

Minggu, 08 Februari 2009

Read xml file from Web services

_
Public Function UploadRFQ_SF() As String
Dim cn As New SqlConnection(strConn)
Dim xmlDocument As XmlDocument = New XmlDocument
Dim cmd As New SqlCommand
Dim strFIELDS As String
Dim strVALUES As String

Dim strsql As String

cn.Open()
xmlDocument.Load("http://rptmanager.ktibali.com/rptmanager/scmglm/Files/XML_FIleName.xml")

Dim xmlNodeList As XmlNodeList = xmlDocument.SelectNodes("/NewDataSet/hasil")

Dim node As XmlNode
Dim i As Integer = 0

cmd.Connection = cn
For Each node In xmlNodeList
strFIELDS = "RFQID_sf"
strVALUES = node.SelectSingleNode("RFQID_sf").InnerXml

strFIELDS = strFIELDS & ",RFQID"
strVALUES = strVALUES & "," & node.SelectSingleNode("RFQID").InnerXml

strFIELDS = strFIELDS & ",SuppID"
strVALUES = strVALUES & "," & node.SelectSingleNode("SuppID").InnerXml

strFIELDS = strFIELDS & ",InputDate"
strVALUES = strVALUES & ",'" & CDate(node.SelectSingleNode("InputDate").InnerXml) & "'"

strFIELDS = strFIELDS & ",companyID"
strVALUES = strVALUES & "," & node.SelectSingleNode("companyID").InnerXml

strsql = "INSERT INTO tblSource (" & strFIELDS & ") VALUES (" & strVALUES & ")"
cmd.CommendText = strsql

cmd.ExecuteNonQuery()
Next
End Function