troubleshooting Question

How to code in vb.net with 2 mysql connection from localhost and remote internet database server?

Avatar of rionroc
rionrocFlag for United States of America asked on
MySQL Server
19 Comments1 Solution708 ViewsLast Modified:
How to code this in vb.net mysql 2 server connection?

SELECT INTERNETSERVERenroll.ID
FROM INTERNETSERVERenroll
WHERE INTERNETSERVERenroll.ID NOT IN
(SELECT LOCALSERVERenroll.ID FROM LOCALSERVERenroll)
Protected lmyconn As MySqlConnection
Protected imyconn As MySqlConnection
Protected XmyCom As New MySqlCommand
 
Protected Const lConStr As String = "server=" & "localhost" & ";" _
& "port=" & "3306" & ";" _
& "user id=" & "xid" & ";" _
& "password=" & "xpw" & ";" _
& "database=LOCALDB"
 
Protected Const iConStr As String = "server=" & "203.177.108.33" & ";" _
& "port=" & "3306" & ";" _
& "user id=" & "yid" & ";" _
& "password=" & "ypw" & ";" _
& "database=INTERNETDB"
 
 
''LOCALDB Table is tableX, Field1 is ID, Field2 is XPicture
''INTERNETDB Table is tableY, Field1 is ID, Field2 is YPicture
 
Private Sub somecommands()
 Dim sqlSELECT As String= "?WHAT CODE IS MISSING HERE?, USING 2 SELECT?"
 ?myCom = New MySqlCommand(sqlSELECT, ?myconn)
 Dim myReader As MySqlDataReader
 myReader = lmyCom.ExecuteReader()
 While myReader.Read
 End While
 myReader.Close()
End Sub
 
Please Fill in the trailed ?Mark.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 19 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 19 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros