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
kiko yang
NA
4
10.4k
how to populate mysql union query by using dataset in VB.Net?
Oct 17 2011 5:29 AM
Hi all, regarding to the subject. I'm using MySQL and VB.NET. I was unable to output the value as it always return with empty value but i can get the value by using mysql console. I'm using the below query and codes:
Dim strSQL as string
Dim objRS As DataSet
Dim objConn As MySqlConnection
objDataAdapter = New MySqlDataAdapter
strSQL = "SELECT MAX(memberID) as max_member_id FROM ((SELECT memberID FROM A) UNION (SELECT memberID FROM B))";
objDataAdapter.SelectCommand = New MySqlCommand(strSQL, objConn)
objDataAdapter.Fill(objRS)
Anyone has the idea how to do that? Thanks a lot.
Reply
Answers (
2
)
Xml serializer
Ado.net disconnected mode