Problem with connection via ByteFX (and ODBC too :o))
Posted by: pavel.janda
Date: October 24, 2004 01:04AM

Hello everyone,

till now, I used mysql only with php. But time changes and I have to do something in .NET... So, I am pretty new in using .NET and I have following problem.

I am tring to connect DB on localhost and it always says, that is not able to connect selected host.

I've written the following simple code:
---
Imports ByteFX.Data.MySqlClient

Public Class Form1
Inherits System.Windows.Forms.Form
.....

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myConStr As String = "Data Source=localhost;User Id=root;Password=root;Database=mysql"
Dim myConnection As New MySqlConnection(myConStr)
Try
myConnection.Open()
Catch
MsgBox(Err.Description.ToString())
End
End Try
'MsgBox("HELLO")
End Sub
End Class
---

Can you help me? I am sure, that mysql is working OK.
Almost the same problem I have with ODBC too.

Thanks a lot!
Pavel

Options: ReplyQuote


Subject
Written By
Posted
Problem with connection via ByteFX (and ODBC too :o))
October 24, 2004 01:04AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.