Shared Memory connections

Shared Memory connections

Postby Guest » Wed 12 Jan 2005 01:52

How do you configure the data source with a shared memory protocol. I tried adding "potocol=memory" to the connection string, but I get the following exception:

Wrong or unknown protocol

Also, do I have to do something special with MySQL to make it accept Shared Connections, and if so, how do I do that?

Thanks!
Guest
 

Re: Shared Memory connections

Postby Oleg » Fri 14 Jan 2005 07:30

Try also to add Direct = false in your connection string.
In Direct mode shared memory protocol isn't supported.
Oleg
Devart Team
 
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Postby Guest » Fri 14 Jan 2005 22:07

Thank you so much! It works great now :D
Guest
 

Postby Guest » Fri 14 Jan 2005 22:14

Anonymous wrote:Thank you so much! It works great now :D


Well thank you anyway, but nope, it didn't work :( I was just desperate to get it to work by any means that I forgot to add "protocol=memory" to the connection string.

So, with this connection string, it still does NOT work:

"server=localhost;uid=myuid; pwd=mypwd; database=mydb; protocol=memory; direct=false"

I'm getting a different exception now:

Unhandled Exception: Can't open shared memory; client could not create request event (2)
Guest
 

Postby Guest » Fri 14 Jan 2005 22:25

It's now failing on the Connection.Open(). Here's the stack trace (due to the obfuscator, you can hardly tell what's going on):

Code: Select all
   at CoreLab.MySql.w.e()
   at CoreLab.MySql.w.a(String A_0, String A_1, String A_2, String A_3, Int32 A_4, Int32 A_5, MySqlProtocol A_6, Boolean A_7)
   at CoreLab.MySql.w..ctor(h A_0)
   at CoreLab.MySql.f.a(DbConnectionOptions A_0, Object A_1, DbConnectionBase A_2)
   at CoreLab.Common.DbConnectionFactory.a(DbConnectionPool A_0, DbConnectionOptions A_1)
   at CoreLab.Common.DbConnectionPool.a()
   at CoreLab.Common.DbConnectionPool.GetObject()
   at CoreLab.Common.DbConnectionFactory.a(DbConnectionBase A_0)
   at CoreLab.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
   at CoreLab.Common.DbConnectionBase.Open()
   at CoreLab.MySql.MySqlConnection.Open()
   at TestMySQLSharedMemroy.SharedMemoryTest.Main(String[] args) in c:\class1.cs:line 33
Guest
 

Postby Oleg » Mon 17 Jan 2005 08:50

Try to start your MySQL server with the --shared-memory option.
Oleg
Devart Team
 
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Postby Guest » Mon 17 Jan 2005 19:55

Oleg wrote:Try to start your MySQL server with the --shared-memory option.


I added "shared-memory" to my.ini and restarted the server. It still doesn't work.
Guest
 

Postby Oleg » Tue 18 Jan 2005 08:38

Most likely your server doesn't support shared memory protocol at all.
Try to find out it.
Oleg
Devart Team
 
Posts: 264
Joined: Thu 28 Oct 2004 13:56


Return to dotConnect for MySQL