VS 2008 - How to connect to Embedded MySQL database?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
senglory
Posts: 9
Joined: Sat 21 Aug 2010 07:59

VS 2008 - How to connect to Embedded MySQL database?

Post by senglory » Sat 21 Aug 2010 08:01

How can I do it?

Shalex
Devart Team
Posts: 8088
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Sat 21 Aug 2010 08:30


senglory
Posts: 9
Joined: Sat 21 Aug 2010 07:59

Doesn't help

Post by senglory » Tue 14 Sep 2010 05:55

Wrote the following connection string:

Code: Select all

    Public Const CONNECTION_STRING_TEMPLATE As String = "User ID=root; Server Parameters=\""--basedir=c:/mysql/;--datadir=c:/mysql/data/;\""; Embedded=True;"
Got the following error:


"Unknown connection string parameter --datadir."

What's wrong with my connection string?

Shalex
Devart Team
Posts: 8088
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 15 Sep 2010 10:07

In C# and VB, double quote (") marks a start/end of a string literal. If you want to tell the compiler to consider " as a part of string itself, it is necessary to use \" (additional backslash) in C# and "" (additional double quote) in VB.

Please try the following connection string:

Code: Select all

    Public Const CONNECTION_STRING_TEMPLATE As String = "User ID=root; Server Parameters=""--basedir=c:/mysql/;--datadir=c:/mysql/data/;""; Embedded=True;"
We will add a sample for Visual Basic to the Using Embedded Server article.

senglory
Posts: 9
Joined: Sat 21 Aug 2010 07:59

Doesn't help at all

Post by senglory » Wed 15 Sep 2010 14:53

Throws "Unknown connection string parameter Embedded." What's wrong with it?

senglory
Posts: 9
Joined: Sat 21 Aug 2010 07:59

Post by senglory » Thu 16 Sep 2010 15:14

Any luck with the issue?

Shalex
Devart Team
Posts: 8088
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 16 Sep 2010 15:44

I cannot reproduce the error with the 5.80.152 version of dotConnect for MySQL. Please specify your version (the Tools > MySQL > About menu of Visual Studio) and post here your connection string.

senglory
Posts: 9
Joined: Sat 21 Aug 2010 07:59

Post by senglory » Thu 16 Sep 2010 17:39

Here's my project with MYSQL data folders
http://zalil.ru/29687643

DevArt COnnect with the same version, 5.80.152.0

Shalex
Devart Team
Posts: 8088
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 17 Sep 2010 11:13

I can reproduce the "Unknown connection string parameter Embedded." error only using Express Edition of dotConnect for MySQL. Please refer to dotConnect for MySQL edition matrix: the Embedded Server support is available only in the Developer, Professional, and Standard editions.

Post Reply