Connect AdvancedHMI to MySql Database Error?

This isn't a solution, but just to get your feet wet I would roll back on MySQL to 5.7 and see what you get. In my opinion there really isn't anything in 8 that you need right now.

Thanks, I will give that a try...

Our IT dept requested MySql, we have other equipment that uses MySql and Indusoft HMI software to export PLC data.
 
Here is the vb code that I have in so far:




Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim MySqlConn As MySqlConnection

MySqlConn = New MySqlConnection
MySqlConn.ConnectionString = "server=localhost;userid=root;password=Splash123;database=database"

Try
MySqlConn.Open()
MessageBox.Show("Connected")
MySqlConn.Close()

Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
MySqlConn.Dispose()

End Try

End Sub

End Class

What you have copied and pasted into the forum as your first post has a space in the word "database" in the SQL connection string. Oddly, when I quote your first post using the forum quote button, that space disappears. Is there by some chance a non-printing character present in the SQL connection string?

EDIT: When quoted in the reply box, the space is not present, when I hit POST, the space returns.
 
I'm not sure how you'd insert a non-printing character in a string in Visual Studio without seeing it, but I'd delete the string and type it back in just to be sure.
 
I'm not sure how you'd insert a non-printing character in a string in Visual Studio without seeing it, but I'd delete the string and type it back in just to be sure.

It sounds like we already established his code works. It's a .net framework version issue. He said he built a project that worked, until he set .net to version 4, then it didn't. Archie also pointed out the MySQL connector requires 4.5.
 
It sounds like we already established his code works. It's a .net framework version issue. He said he built a project that worked, until he set .net to version 4, then it didn't. Archie also pointed out the MySQL connector requires 4.5.

And I fully agree with you. This is probably an issue with the forum software and not with the code, but this would take all of 30 seconds to rule out.
 

Similar Topics

I'm using a SLC typed write from the ControlLogix5572 to the MicroLogix 1400, with path: 2, (MicroLogix IP). The ControlLogix equipment has a...
Replies
0
Views
62
Hello, As part of our project, we are using an M241 controller. This controller interfaces with an industrial computer and a router via a switch...
Replies
2
Views
74
Here's what happened, Operator turned on the disconnect for an auger while it was still running to cut power. Auger DID in fact turn off, but the...
Replies
8
Views
325
What has been your experience with year over year price increases on your Tech-connect service contracts? Is it up to the distributor? 30% seems...
Replies
5
Views
281
Hello, friends, I am trying to upgrade a system that uses an Onrom incremental encoder (E6B2-CWZ6C) connected to a Danfoss VFD (FC360), but now...
Replies
4
Views
270
Back
Top Bottom