Problems MySQLDirect.NET Mobile
It is important control the falls of connections when the application is open considering the situations like:
Outside cover WIFI
MySQL Server OFF
Loss connection
Etc.
The project that I am developing goes to work much in network. It is an application for restaurants whose objective is the kitchen note management. For that reason it is necessary control these situations.
Outside cover WIFI
MySQL Server OFF
Loss connection
Etc.
The project that I am developing goes to work much in network. It is an application for restaurants whose objective is the kitchen note management. For that reason it is necessary control these situations.
there is a bug, the situation is the following one:
with the open application...
MySQL Start & Pocket PC WIFI ON -> MSGBOX = “Conect” CORRECT
MySQL Stop & Pocket PC WIFI ON -> MSGBOX = “Conect” NOT CORRECT
The code:
MySQLDirect .NET Data Provider Mobile Standard version 3.55.22
In module:
In form:
with the open application...
MySQL Start & Pocket PC WIFI ON -> MSGBOX = “Conect” CORRECT
MySQL Stop & Pocket PC WIFI ON -> MSGBOX = “Conect” NOT CORRECT
The code:
MySQLDirect .NET Data Provider Mobile Standard version 3.55.22
In module:
Code: Select all
Imports CoreLab.MySql
Module basConect
Public conn As New MySqlConnection("User ID=root;Password=;Host=192.168.0.3;Port=3306;Database=test;")
Public Sub ConectMySQL()
Try
conn.Open()
MsgBox("Conect", MsgBoxStyle.Information, "")
Catch ex As MySqlException
MsgBox(ex.Message, MsgBoxStyle.Critical, "")
End Try
End Sub
End Module
Code: Select all
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ConectMySQL()
End Sub
Try to use the following code for your module:
Spot the connection pooling is off and Close() method was called.
Code: Select all
Imports CoreLab.MySql
Module basConect
Public conn As New MySqlConnection("User ID=root;Password=root;Host=192.168.0.123;Port=3308;Database=test;pooling=false")
Public Sub ConectMySQL()
Try
conn.Open()
MsgBox(conn.ServerVersion, MsgBoxStyle.Information, "")
conn.Close
Catch ex As MySqlException
MsgBox(ex.Message, MsgBoxStyle.Critical, "")
End Try
End Sub
End Module