TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sri ranjani
NA
81
4.2k
Need to fetch value from table and store it in a array
Oct 16 2018 11:14 PM
Hi,
I need to select values from table and i need to store it in a array.
Protected Sub getwmslocationlist(ByVal site As String) ', ByVal s As String)
Dim oProducts As List(Of String)
Dim aProducts As String()
Dim i As Integer
Using con As SqlConnection = New SqlConnection(constr)
Using cmd As SqlCommand = New SqlCommand("select * from InventLocation iloc,wmsLocation wmsloc where iloc.dataareaid='BRM' and wmsloc.dataareaid='BRM' and iloc.InventSiteId='" & site & "' and iloc.InventLocationType=1 and wmsloc.inventLocationId=iloc.InventLocationId")
Dim dt As SqlDataAdapter = New SqlDataAdapter()
Try
cmd.Connection = con
con.Open()
dt.SelectCommand = cmd
Dim dTable As DataTable = New DataTable()
dt.Fill(dTable)
oProducts = New List(Of String)
For i = 0 To dTable.Rows.Count - 1
oProducts.Add(dTable.Rows(i)("wmslocationid"))
Next
aProducts = oProducts.ToArray
Catch ex As Exception
LblError.Text = Err.Description
If con.State = ConnectionState.Open Then
con.Close()
End If
End Try
End Using
End Using
End Sub
how could i do that?
Reply
Answers (
1
)
Asp.net mvc 5 search implementation
edit all td values in html table or webgrid