Problems with connecting to embedded server
Posted: Fri 05 Nov 2010 09:09
I'm evaluating dotconnect for MySQL with my VB .Net application.
The application has 2 modes, using MySQL Server and embbeded Server, version 4.1
Access to the server works fine.
I just use
Imports Devart.Data.MySql
instead of
Imports MySql.Data.MySqlClient
and the application still works.
With embedded server I get no connection. The application ends without error or exception in the try block during execution of DBConn.open()
There is no database existing so far. This should be created by my application after connection to the embedded server
Optionally I tried to use mysql.ini file in the work path of the application and set
myConnectionString = "Embedded=True;"
because ConnectionString must be set
This leads to an execpion "error initalizing embedded server"
Any hints/ideas how to solve this problem?
The application has 2 modes, using MySQL Server and embbeded Server, version 4.1
Access to the server works fine.
I just use
Imports Devart.Data.MySql
instead of
Imports MySql.Data.MySqlClient
and the application still works.
With embedded server I get no connection. The application ends without error or exception in the try block during execution of DBConn.open()
There is no database existing so far. This should be created by my application after connection to the embedded server
Code: Select all
DBConn = New MySqlConnection
myConnectionString = "User Id=root; Server Parameters=""--basedir=" & workPath & "; --datadir=" & dataPath & ";""; Embedded=True;"
DBCmd = New MySqlCommand
DBCmd.Connection = DBConn
try
DBConn.ConnectionString = myConnectionString
DBConn.Open()
...
Catch ex As MySqlException
...
Catch ex As DataException
....
End Try
myConnectionString = "Embedded=True;"
because ConnectionString must be set
This leads to an execpion "error initalizing embedded server"
Any hints/ideas how to solve this problem?