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.
Loading

VulpesRank #55 · 29.2K reputationPosted Oct 17, 2011, 2:42 AM EDT
kiko yang4 reputationPosted Oct 18, 2011, 12:18 AM EDT