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
Phuc Hoang
NA
4
0
Return datatable
Dec 1 2010 8:22 PM
Hello Everybody
How can i return database that using SELECT
Here is my code
Public Function Recommened_GetUser(ByVal UserID As Integer, ByVal Path As String) As Data.DataTable
Dim dataset As New Data.DataSet
dataset.ReadXml(Path & filename)
Dim dt_ret As DataTable
Dim table As DataTable = dataset.Tables("Recommendhotel")
' Presuming the DataTable has a column named Date.
Dim expression As String
expression = "UserID='" & UserID & "'"
Dim foundRows() As DataRow
' Use the Select method to find all rows matching the filter.
foundRows = table.Select(expression)
Dim i As Integer
' Print column 0 of each returned row.
For i = 0 To foundRows.GetUpperBound(0)
dt_ret = foundRows(i)(0)
// I want to return datatable
Next i
Return dt_ret
End Function
I want to select that only show depend on condition (UserID)
I really appreciate all the help you can give me!
Thanks in advance
Phuc Hoang
Reply
Answers (
3
)
How to run a rdlc report in web server using reportviewer and MySQL ODBC provider?
what is viewstate in asp.net?