Have a problem,
I have a code written in vb.net that works perfectly, at least so far. I have several windows and linux servers and it has worked on all of them. Today I have installed a new server with CentOS 8 and MariaDB. If I execute the query from workbench it works perfectly, if I execute it by command line through ssh it also works. But if I run it in my code, it doesn’t return any result, that is, it returns an empty datatable, it doesn’t throw any error, but I don’t get the necessary records.
The query only lists the available databases beginning with "app_"
Dim dt As New System.Data.DataTable
Try
Dim cmm As String = "SELECT information_schema.schemata.schema_name FROM information_schema.schemata WHERE information_schema.schemata.schema_name LIKE 'app_%'"
Me.MiAdap = New MySqlDataAdapter(cmm, MiObjCon)
Me.MiAdap.Fill(dt)
Return dt
Catch mySqlException1 As MySqlException
Throw New ICB.DataBase.DBException(mySqlException1, CLng(mySqlException1.Number))
End Try
Any idea?
If I execute the query from workbench it works perfectly, if I execute it by command line through ssh it also works. But if I run it in my code, it doesn’t return any result, that is, it returns an empty datatable
2
Answers
Yes, install a new server, but all connections are remote, only ssh is local, but workbench connect is remote. I load a backup and have 6 databases that is listed if run query on workbench but return empty datatable is run in my code.
No error codes because no throw any error, connect is ok, query is ok, only return a empty datatable... it's strange
Regards!
Since you’re not sharing any error messages, we kind of have to just guess at this. But the key phrase that jumps out at me is this:
This leads to three possible sources for the error:
However, for 1 & 2 I’d expect more of an error than just an empty result, and for 3 I’d expect Workbench or SSH to behave differently.