Hi again everyone.
I've come this time with a different problem for me to solve...
My company has an xml file which has most of the customer's information stored, the company is on a phase of automating daily routines and one of them is to check for any problems with current purchasing orders, deliveries and so on...
So I was asked to get an application to automate this routine, in order to save hours of expendable work.
Anyway, here's what I need to know:
I have an xml file as I've already stated before and the application has a DGV, the whole code is working great, data is being shown on the DGV (which is not what's intended) and now I need to know how I compare the data on xml file with the data of a specific table that is stored on a variable (I've stored this data with a Stored Procedure).
Here's the code to better explain myself:
Note: As you probably noticed, this function is suposed to return a datatable, though I'm not quite sure what the fuction is really supose to return at this stage, but it's not relevant to the question I'm having at this point.
According to this code you can see that the connection is made and data is stored on a Stored Procedure, which in turn stores the data that it reads into a variable named FieldValues, where this value is added into a table (inside a loop), finally I'm navigating through every row of the table, getting myself ready to compare each row to the "node" on the xml file.
I need to know how I compare each row to each node on the xml file and then bring the nodes that are associated to that node, into the DGV
I've come this time with a different problem for me to solve...
My company has an xml file which has most of the customer's information stored, the company is on a phase of automating daily routines and one of them is to check for any problems with current purchasing orders, deliveries and so on...
So I was asked to get an application to automate this routine, in order to save hours of expendable work.
Anyway, here's what I need to know:
I have an xml file as I've already stated before and the application has a DGV, the whole code is working great, data is being shown on the DGV (which is not what's intended) and now I need to know how I compare the data on xml file with the data of a specific table that is stored on a variable (I've stored this data with a Stored Procedure).
Here's the code to better explain myself:
Code:
Public Function _devolverDadosXML_viaSP(ByVal NomeSP As String) As DataTable
Dim FieldValues(0) As Object 'A Temporary Variable to retrieve all columns in a row and fill them in Object array
_minhaLigacaoSQL.ConnectionString = _connectionString
_minhaLigacaoSQL.Open()
_instrucaoSQL.CommandText = NomeSP
_instrucaoSQL.CommandType = CommandType.StoredProcedure
_instrucaoSQL.Connection = _minhaLigacaoSQL
'_instrucaoSQL.Parameters.Add(New SqlClient.SqlParameter("codigolocalentrega", SqlDbType.VarChar, 50, ParameterDirection.Input, False, 30, 0, "", DataRowVersion.Current, "Y%"))
_SQLDBDataReader = _instrucaoSQL.ExecuteReader()
_umaTabela.Columns.Add("codigolocalentrega", GetType(String))
While (_SQLDBDataReader.Read)
_SQLDBDataReader.GetValues(FieldValues)
_umaTabela.Rows.Add(FieldValues)
End While
For i As Integer = 0 To _umaTabela.Rows.Count - 1
Next
Return Nothing 'Ignore this line of code as I wrote it only to get past the function general error...
According to this code you can see that the connection is made and data is stored on a Stored Procedure, which in turn stores the data that it reads into a variable named FieldValues, where this value is added into a table (inside a loop), finally I'm navigating through every row of the table, getting myself ready to compare each row to the "node" on the xml file.
I need to know how I compare each row to each node on the xml file and then bring the nodes that are associated to that node, into the DGV