S
Sparky Arbuckle
I have a function that returns the most recent value corresponding to
an ItemNumber. ItemNumber A can have up to 5 revisions to it so a
dataset would look something like.
A - A1
A - A2
A - A3
A - A4
A - A5
What I am trying to do is build a string and attribute that string to
lblRevisions in my datalist. The function that I am using to grab the
newest revision is below:
Function GetNewestADCNByDrawing(ByVal x As String)
Dim objConn As New
OleDb.OleDbConnection(ConfigurationSettings.AppSettings("strConnection"))
Dim strSQL As String = "SELECT * FROM * WHERE X = '" & variableName &
"';"
Dim dsRevisions As New DataSet
Dim objCommand As New OleDb.OleDbCommand(strSQL, objConn)
Dim myCommand As New OleDb.OleDbDataAdapter(strSQL, objConn)
myCommand.Fill(dsRevisions, "tblRevisions")
Return dsRevisions.Tables("tblRevisions")
End Function
The value that is returned is an number between 1 and 5. The way I want
to display this is by determining the newest ItemNumber (i.e. A) and
the newest RevisionNumber(i.e 5) and display in a label:
A1,A2,A3,A4,A5
I know it will include a FOR NEXT to concatenate. Any suggestions as to
how I will go about doing this?
an ItemNumber. ItemNumber A can have up to 5 revisions to it so a
dataset would look something like.
A - A1
A - A2
A - A3
A - A4
A - A5
What I am trying to do is build a string and attribute that string to
lblRevisions in my datalist. The function that I am using to grab the
newest revision is below:
Function GetNewestADCNByDrawing(ByVal x As String)
Dim objConn As New
OleDb.OleDbConnection(ConfigurationSettings.AppSettings("strConnection"))
Dim strSQL As String = "SELECT * FROM * WHERE X = '" & variableName &
"';"
Dim dsRevisions As New DataSet
Dim objCommand As New OleDb.OleDbCommand(strSQL, objConn)
Dim myCommand As New OleDb.OleDbDataAdapter(strSQL, objConn)
myCommand.Fill(dsRevisions, "tblRevisions")
Return dsRevisions.Tables("tblRevisions")
End Function
The value that is returned is an number between 1 and 5. The way I want
to display this is by determining the newest ItemNumber (i.e. A) and
the newest RevisionNumber(i.e 5) and display in a label:
A1,A2,A3,A4,A5
I know it will include a FOR NEXT to concatenate. Any suggestions as to
how I will go about doing this?