今天试着在 Mono 中使用 mySql 的连接驱动 "MySql.Data.dll" 时出现异常:
System.EntryPointNotFoundException: CreateSemaphoregoogle 后发现 似乎时需要在连接字符串中设置 "Pooling=false"
at (wrapper managed-to-native) MySql.Data.Common.Semaphore:CreateSemaphore (MySql.Data.Common.SECURITY_ATTRIBUTES&,int,int,string)
at MySql.Data.Common.Semaphore..ctor (Int32 initialCount, Int32 maximumCount) [0x00000]
at (wrapper remoting-invoke-with-check) MySql.Data.Common.Semaphore:.ctor (int,int)
at MySql.Data.MySqlClient.MySqlPool..ctor (MySql.Data.MySqlClient.MySqlConnectionString settings) [0x00000]
at MySql.Data.MySqlClient.MySqlPoolManager.GetPool (MySql.Data.MySqlClient.MySqlConnectionString settings) [0x00000]
at MySql.Data.MySqlClient.MySqlConnection.Open () [0x00000]
private const string CONNECTION_STRING = "server={0};database={1};uid={2};pwd={3};Pooling=false;";这样就正常了。
原因还不清楚……
//EOF
1 comments:
Hi there,
These blog entry help me a lot
thanks ;)
Post a Comment