0

Hello everyone,

I'm writing up a new application that instead of using microsoft as a server, I'm using a linux server with a database in it. The database was setup, the tables were set up, and access was granted in mysql. The issue I'm having is that I keep getting an error message with error 25 stating that "A network related or instance specific error occurred." then it goes down to say error -25 connection string is not valid. This is the connection method that I am utilizing:

        On Error GoTo errorhandler

        Dim con As New SqlClient.SqlConnection("server=192.168.0.23:3306; database=test; user ID=root;Password=password;Integrated Security=true;")
        Dim cmd As SqlCommand
        cmd = New SqlCommand("SELECT * FROM students", con)
        Dim da As SqlDataAdapter
        Dim ds As DataSet
        da = New SqlDataAdapter(cmd)
        ds = New DataSet
        da.Fill(ds, "students")

        MsgBox(ds)

        con.Open()
        DataGridView1.DataSource = ds.Tables("students").DefaultView
        con.Close()

        Exit Sub
errorhandler:
        MsgBox(Err.Description, vbExclamation)

Does anyone have an idea as to why this is not working? Or, how to get this working? I would greatly appreciate it.

2
Contributors
2
Replies
9
Views
3 Years
Discussion Span
Last Post by amvx86
0

lol I changed the passwords for safety but it doesn't matter as the server is in-house and once the server is worked on it will have these defaults changed. When I try to connect through telnet I get some funky errors. When I go through phpmyadmin it connects just fine. Any suggestions?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.