Phreak
Well-known member
Ok, so I can connect to my database with the following code:
UID = txtUsername.Text
Pass = txtPass.Text
ServIP = txtHost.Text
DBName = txtDB.Text
ConPort = txtConPort.Text
conn = CreateObject("ADODB.Connection")
rs = CreateObject("ADODB.RecordSet")
conn.Open("Driver={MySQL};" & _
"Server=" & ServIP & ";" & _
"Port=" & ConPort & ";" & _
"Option=131072;" & _
"Stmt=;" & _
"Database=" & DBName & ";" & _
"Uid=" & UID & ";" & _
"Pwd=" & Pass & ";")
This is all done on an initial "Login" form, and once there is a connection detected, I want it to go away and the main form to be displayed. Is there anyway to tell when the connection is made and if so, a way to pass the connection to the main form? Or can I not use persistant connections?
UID = txtUsername.Text
Pass = txtPass.Text
ServIP = txtHost.Text
DBName = txtDB.Text
ConPort = txtConPort.Text
conn = CreateObject("ADODB.Connection")
rs = CreateObject("ADODB.RecordSet")
conn.Open("Driver={MySQL};" & _
"Server=" & ServIP & ";" & _
"Port=" & ConPort & ";" & _
"Option=131072;" & _
"Stmt=;" & _
"Database=" & DBName & ";" & _
"Uid=" & UID & ";" & _
"Pwd=" & Pass & ";")
This is all done on an initial "Login" form, and once there is a connection detected, I want it to go away and the main form to be displayed. Is there anyway to tell when the connection is made and if so, a way to pass the connection to the main form? Or can I not use persistant connections?