String Builder

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top