VS 2008 - How to connect to Embedded MySQL database?

VS 2008 - How to connect to Embedded MySQL database?

Postby senglory » Sat 21 Aug 2010 08:01

How can I do it?
senglory
 
Posts: 9
Joined: Sat 21 Aug 2010 07:59

Postby Shalex » Sat 21 Aug 2010 08:30

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

Doesn't help

Postby 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?
senglory
 
Posts: 9
Joined: Sat 21 Aug 2010 07:59

Postby 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.
Shalex
Devart Team
 
Posts: 7699
Joined: Thu 14 Aug 2008 12:44

Doesn't help at all

Postby 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

Postby senglory » Thu 16 Sep 2010 15:14

Any luck with the issue?
senglory
 
Posts: 9
Joined: Sat 21 Aug 2010 07:59

Postby 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.
Shalex
Devart Team
 
Posts: 7699
Joined: Thu 14 Aug 2008 12:44

Postby 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
senglory
 
Posts: 9
Joined: Sat 21 Aug 2010 07:59

Postby 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.
Shalex
Devart Team
 
Posts: 7699
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for MySQL