Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all 1447 articles
Browse latest View live

ConnectionString multiple servers error (bug?) (no replies)

$
0
0
Well, I'll give this a shot here, although it doesn't seem to be a very active forum...

Trying a connection string with multiple servers for a replicated environment doesn't work. I get the error "Unable to connect to any of the specified MySQL hosts." I am using version 6.8.3 (for .net 2.0)

here is my connection string:
<add name="DSN" connectionString="server=192.168.100.220, 192.168.100.221; Database=***; User ID=***; Password=***; Max Pool Size = 500; " providerName="MySql.Data.MySqlClient"/>

Using either one of those IP's individually works, but together it doesn't. Also, this connection string works with version 6.6.6

Is this a bug maybe?

Unable to connect to any of the specified MySQL hosts [EntityException: The underlying provider failed on Open.] (2 replies)

$
0
0
Hi, i am facing this problem after uploading in server. Everything is working fine in local. Please help me on this topic

Need Assistance Trying to CREATE a table in VB.Net (1 reply)

$
0
0
Hi,

I am using this little bit of code and trying to create a MySQL table:

Dim MySqlConn As New MySqlConnection( _
"data source=localhost; database=********; user id=root; password=********")
Dim MySqlCmd As MySqlCommand

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

Try
MySqlConn.Open()
MySqlCmd = New MySqlCommand("USE ********;", MySqlConn)
MySqlCmd = New MySqlCommand("CREATE TABLE whatever (id INT(6) NOT NULL AUTO_INCREMENT, PRIMARY KEY (id));", MySqlConn)
'MySqlCmd = New MySqlCommand(
Catch ex As Exception
MsgBox(ex.ToString)
End Try

Debugger.Break()

The Catch block is never entered. And in the Debugger MySqlConn looks OK (to me!). connectionState and State are both Open{1}. But on the other hand I cannot find Settings.Port (3306) in the WorkBench Client Connections. However, the last entry in the "Server Logs" does contain that port number. So I am not certain that my app is even connected. But I am certain that the table I am trying to create does not show up in the WorkBench.

What do you think? Is the app not getting connected at all or is there something wrong with my CREATE TABLE?

I'll appreciate any help you can offer. Thanks, Bob

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. (no replies)

$
0
0
I am trying to connect to MySQL database from a SSIS package. I am using .NET provider for MySQL Data provider connection type to connect to MySQL.

I have been facing the timeout issue error.
Issue:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

I tried to add below connection attributes to connection string, but still it is failing.
server=<servername>;user id=<userid>;port=3306;database=<database> ;persistsecurityinfo=True;connect timeout = 3600;Allow Batch = true;Pooling= true;default command timeout=200;

Please help. I appreciate your response.

Connector/Net will not install. Problem with WebProvider (no replies)

$
0
0
I have seen numerous cases of similar problems but I've never seen a solution. I deleted all MySQL components then, using the installer, re-installed everything which all went fine except Connector/Net 6.8.3. Following several threads, I found I could install Connector/Net using the stand-alone connector installer as long as I disabled WebProviders. Problem is, I need the providers. According to the log file, the problem seems to be related to ManagedWebInstall.

With the large number of similar threads out there, I'm hoping someone has either solved it or could at least say the this is a known bug that someone is working. This has me totally stopped. I cannot reinstall the previous version of connector/net which worked because it has the same behavior now.


<snippet>

10: Action 13:58:37: ManagedDataInstall. Registering data provider in machine.config
10: Action 13:58:37: ManagedWebInstall. Registering web providers in machine.config
10: Action 13:58:39: Rollback. Rolling back action:
10: Registering web providers in machine.config
10: Registering data provider in machine.config
10: Copying new files
10: Creating folders
10: Updating component registration
10: 1: MySQL Connector Net 6.8.3 2: {38157422-F952-42F7-88AA-CC16A63CD109} 3: 3
10:
10: Final actions.
10: Install error

MySQL .Net connector extremely slow on one ISP (3 replies)

$
0
0
I have a Windows Forms .Net 4.0 application which connects to a MySQL 5.5 Server on a dedicated Windows server at our web hosting company (WebAfrica). I am using MySQL Connector 6.8.3.

Everything was working perfectly, until we switched internet service providers (from M-Web to AfriHost). Now, with the new provider, connecting to the database is EXTREMELY slow - to the point that it times out 90% of the time (and out timeout is 150 seconds!). As soon as we switch to another ISP, then everything works perfectly, and connections open in a second or two. I've spoken to our ISP, and they are clueless...

The other weird thing is that connecting to that same database via a tool such as Workbench, SQLyog or dbForge Studio works perfectly! The problem seems to happen ONLY when connecting to the database via MySQL Connector AND when we are with the AfriHost ISP.

Does anyone have any ideas as to what might be causing this very strange phenomenon?

Connection pooling not working (no replies)

$
0
0
I have a Windows Forms app targeting .NET framework 4.0, which connects to a MySQL Server 5.5.9 database running on Windows Web Server 2008 R2. I'm using the MySQL .NET Connector 6.8.3 for the data access. The database is hosted at my ISP on a dedicated server.

I don't think "connection pooling" is working properly, or I'm doing something wrong. Here's why I think this is the case:

I recently read that it is good practise to use the MySqlHelper classes instead of opening/closing connections oneself. One of the benefits being that it uses connection pooling. So I performed a little expirement.

I executed a query 100 times in a loop. I did this twice. Firstly, using the helper classes:

For i As Integer = 1 To 100
MySqlHelper.ExecuteNonQuery(connectionString, "DELETE FROM users")
Next i

I then tried it the way I normally do it:

Using cn As New MySqlConnection(connectionString)
cn.Open()
Dim cmd As New MySqlCommand("DELETE FROM users", cn)
For i As Integer = 1 To 100
cmd.ExecuteNonQuery()
Next i
cn.Close()
End Using

The users table was empty to begin with.

The first loop took an average of 23 seconds to execute over 5 runs.
The second loop took an average of 7 seconds to execute over 5 runs.

I can only attribute this to the fact that the first loop is opening and closing the connection 100 times, whereas the second loop is opening and closing the connection only once. But, here comes my query... isn't connection pooling supposed to keep the connection open behind the scenes (I think for 3 minutes by default I read somewhere?), so that the two loops should run at very similar speeds? It feels like connection pooling is not working, or active, or I'm doing something wrong... Any ideas anyone?

Thanks...

MySQL Connector/NET - how to hash password / use "salt" in "server greeting" (no replies)

$
0
0
Hello,

I am hereby writing you as a .NET application I am currently authoring is unable to connect to MySQL server with various unicode passwords, namely the "§" character.

Yet, I am able to connect with the same user account through the MySQL Workbench Community Edition, and using Wireshark I have picked up an interesting packet (from the server) that seems to be some sort of "server greeting" in which the client receives the "salt" for hashing/xoring the password.

As far as I can see the .NET Connector sends plain text password (exactly how the connection string is created, no matter whether it is formed by concatenating strings or whether the MySqlConnectionStringBuilder is used).

I have not seen any salt/greeting related functions and therefore I cannot hash the password manually (if the connector doesn`t do it itself).

Can someone help me with this?

Thank you very much !

Help Needed to Unravel a Query Response (3 replies)

$
0
0
Hi,

I am very new to this stuff and would greatly appreciate some help unraveling the response to this query in VB.Net or C#:

"SELECT table_schema , SUM( data_length + index_length) / 1024 / 1024 " & _
"""Data Base Size in MB"" FROM information_schema.TABLES GROUP BY table_schema ;"

The query does what I want - I can see the correct response in the Workbench. The Workbench response shows two columns: table_schema and Sum(data_length etc..

I've done something which I think is similar using a DataTable (another creature I am new to) but I have been unable to modify that code to handle this situation.

So ... if someone could help me out I'd appreciate it.

Bob

Problem with running MySQL Connector simple applicaton on MONO (4 replies)

$
0
0
Hello,

I have Ubuntu Linux with MONO installed (MONO JIT compiler version 3.2.8 Debian 3.2.8+dfsg-4ubuntu1), and I have installed the MySQL connector 6.8.3.0. I have followed all installation instructions, and after some problems I finally added the MySql.Data.dll to GAC and I have managed to compile my simple C# code with gmcs. The code uses MySqlConnection class to connect to the database.

The problem is that when I run my compiled application I get the following error:

Unhandled Exception:
System.TypeLoadException: Could not load type 'MySql.Data.MySqlClient.MySqlConnection' from assembly 'MySql.Data, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'.
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'MySql.Data.MySqlClient.MySqlConnection' from assembly 'MySql.Data, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'.

The assembly MySql.Data.dll is present in GAC, when I remove it from GAC I get a different error running my application:

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'MySql.Data, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies.
File name: 'MySql.Data, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'MySql.Data, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies.
File name: 'MySql.Data, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'

Can anybody suggest me the way to go to solve the issue? I've been working hard on it since a while...

Any help higlhy appreciated.

Can't update model from database (1 reply)

$
0
0
Hello,

My environment consists of the following:

Connector .NET 6.8.3
Packages installed from Nuget for EF 6.0.2 & the latest MySql.ConnectorNET.Entity packages
Server 5.6.20
(basically everything installed from MySQL Installer)

I have an existing project I am attempting to modify via the EDMX diagram viewer (right click -> Update Model from Database). I am able to proceed normally, identifying a new data connection, etc, however when I click next, I receive the following message:

Your project references the latest version of Entity Framework; however, an Entity Framework database provider compatible with this version could not be found for your data connection. If you have already installed a compatible provider, ensure you have rebuilt your project before performing this action. Otherwise, exit this wizard, install a compatible provider, and rebuild your project before performing this action.

The project builds, runs and loads fine; I simply cannot get past this screen to actually update the EDMX.

I have tried many iterations to fix this including changing references, verifying what's in the GAC, etc...nothing fixes it.

Thanks in advance for any help you can provide.

-Justin

Cant update from 6.5.4 to Connector/NET 6.8.3 (1 reply)

$
0
0
Im using the MySQL Installer and update feature. It gives me this log:

1:
1: Action 11:46:44: INSTALL.
1: 1: MySQL Connector Net 6.8.3 2: {38157422-F952-42F7-88AA-CC16A63CD109}
1: Action 11:46:44: FindRelatedProducts. Searching for related applications
1: Action 11:46:44: AppSearch. Searching for installed applications
1: Action 11:46:44: LaunchConditions. Evaluating launch conditions
1: Action 11:46:44: ValidateProductID.
1: Action 11:46:44: CostInitialize. Computing space requirements
1: Action 11:46:44: FileCost. Computing space requirements
1: Action 11:46:44: CostFinalize. Computing space requirements
1: Action 11:46:44: InstallValidate. Validating install
1: Action 11:46:44: Setv2InstallUtil.
1: Action 11:46:44: Setv4InstallUtil.
1: Action 11:46:44: InstallInitialize.
1: Action 11:46:44: RemoveExistingProducts. Removing applications
1: Application: {92E19B5A-1985-49BF-9022-9CF4AD652C72}, Command line: UPGRADINGPRODUCTCODE={38157422-F952-42F7-88AA-CC16A63CD109} CLIENTPROCESSID=4724 CLIENTUILEVEL=3 MSICLIENTUSESEXTERNALUI=1 REMOVE=ALL
1: Action 11:46:44: INSTALL.
1: 1: MySQL Connector Net 6.5.4 2: {92E19B5A-1985-49BF-9022-9CF4AD652C72}
1: Action 11:46:44: FindRelatedProducts. Searching for related applications
1: Action 11:46:44: AppSearch. Searching for installed applications
1: Property: OLDVERSION, Signature: Ver5081
1: Property: OLDVERSION, Signature: Ver507
1: Property: OLDVERSION, Signature: Ver506
1: Property: OLDVERSION, Signature: Ver505
1: Property: OLDVERSION, Signature: Ver504
1: Property: OLDVERSION, Signature: Ver503
1: Property: OLDVERSION, Signature: Ver502
1: Property: OLDVERSION, Signature: Ver501
1: Property: OLDVERSION, Signature: Ver500
1: Property: PREUPGRADEVERSION, Signature: Pre638
1: Property: PERUSERINSTALL, Signature: Reg638
1: Property: PERUSERINSTALL, Signature: Reg644
1: Property: HLM_LOCATION, Signature: HLMRegSearch
1: Property: NETFRAMEWORK20, Signature: NetFramework20
1: Property: NETFRAMEWORK40FULL, Signature: NetFramework40Full
1: Property: VS_2008_PATH, Signature: Find_VS2008_Path
1: Property: VS_2010_PATH, Signature: Find_VS2010_Path
1: Action 11:46:44: SetHLMPath.
1: Action 11:46:44: LaunchConditions. Evaluating launch conditions
1: Action 11:46:44: ValidateProductID.
1: Action 11:46:44: CostInitialize. Computing space requirements
1: Action 11:46:44: FileCost. Computing space requirements
1: Action 11:46:44: CostFinalize. Computing space requirements
1: Action 11:46:44: InstallValidate. Validating install
1: Action 11:46:44: Setv2InstallUtil.
1: Action 11:46:44: Setv4InstallUtil.
1: Action 11:46:44: InstallInitialize.
1: Action 11:46:44: GenerateScript. Generating script operations for action:
1: InstallInitialize
1: Action 11:46:44: RemoveExistingProducts. Removing applications
1: Action 11:46:44: ProcessComponents. Updating component registration
1: Action 11:46:44: MsiUnpublishAssemblies. Unpublishing assembly information
1: Action 11:46:44: UnpublishFeatures. Unpublishing Product Features
1: Action 11:46:44: UninstallPerfCounterData.
1: Action 11:46:44: RemoveRegistryValues. Removing system registry values
1: Action 11:46:44: RemoveShortcuts. Removing shortcuts
1: Action 11:46:44: ManagedDataUnInstallSetup.
1: Action 11:46:44: ManagedDataUnInstall. Unregistering data provider from machine.config
1: Action 11:46:44: RemoveFiles. Removing files
1: Action 11:46:44: RemoveFolders. Removing folders
1: Action 11:46:44: CreateFolders. Creating folders
1: Action 11:46:44: InstallFiles. Copying new files
1: Action 11:46:44: CreateShortcuts. Creating shortcuts
1: Action 11:46:44: WriteRegistryValues. Writing system registry values
1: Action 11:46:44: InstallPerfCounterData.
1: Action 11:46:44: RegisterUser. Registering user
1: Action 11:46:44: RegisterProduct. Registering product
1: Action 11:46:44: MsiPublishAssemblies. Publishing assembly information
1: Action 11:46:44: PublishFeatures. Publishing Product Features
1: Action 11:46:44: PublishProduct. Publishing product information
1:
1: Action 11:46:44: InstallFinalize.
1: Action 11:46:44: InstallInitialize.
1: Action 11:46:44: ManagedDataUnInstall. Unregistering data provider from machine.config
1: 1: MySQL Connector Net 6.5.4 2: {92E19B5A-1985-49BF-9022-9CF4AD652C72} 3: 3
1: Action 11:46:44: Rollback. Rolling back action:
1: Unregistering data provider from machine.config
1: InstallInitialize
1: 1: MySQL Connector Net 6.8.3 2: {38157422-F952-42F7-88AA-CC16A63CD109} 3: 3
1:
1: Final actions.
1: Update failed

I have deleted all keys, register and files from 6.5.4, and the Connector/NET 6.5.4 is not found in the "Uninstall Program" in the Control Panel.
Anyone got any clue how I can go on with the update/remove or whatever I need to do ?

question about open and close of MySqlConnection (no replies)

$
0
0
hi
i'd like to ask a question.

MySqlConnection connection = newMySqlConnection(stringConnection);
MySqlCommand cmd = connection.CreateCommand();
connection.Open();
and i have a try catch. accoding to your opinion, i should put connection.Close() in the block of try,or outside of block of try?
according to you,if i open the connection and do not close,is it bad?or i open 2 times(using different istancse,like connection1 and connecton2),is it ok?
thank u very much
best regards
martin

Connector NET will not update. Data Provider is rolling back. (Included log file) (no replies)

$
0
0
Scenario:

I deleted all MySQL components manually. Then I re-installed everything with the installer - everything got installed except Connector/Net 6.8.3. It seems like I still have an older version of MySql installed but it still wont update to 6.8.3.

Update Installer Details (The bottom of details):

1: Action 21:25:10: InstallInitialize.
1: Action 21:25:10: ManagedDataUnInstall. Unregistering data provider from machine.config
1: 1: MySQL Connector Net 6.5.4 2: {92E19B5A-1985-49BF-9022-9CF4AD652C72} 3: 3
1: Action 21:25:10: Rollback. Rolling back action:
1: Unregistering data provider from machine.config
1: InstallInitialize
1: 1: MySQL Connector Net 6.8.3 2: {38157422-F952-42F7-88AA-CC16A63CD109} 3: 3
1:
1: Final actions.
1: Update failed


Log File:

Action 21:14:54: INSTALL.
1: MySQL Connector Net 6.8.3 2: {38157422-F952-42F7-88AA-CC16A63CD109}
Action 21:14:54: FindRelatedProducts. Searching for related applications
Action 21:14:54: AppSearch. Searching for installed applications
Action 21:14:54: LaunchConditions. Evaluating launch conditions
Action 21:14:54: ValidateProductID.
Action 21:14:54: CostInitialize. Computing space requirements
Action 21:14:54: FileCost. Computing space requirements
Action 21:14:54: CostFinalize. Computing space requirements
Action 21:14:54: InstallValidate. Validating install
Min: 0 Max: 1413
Position: 25
Position: 50
Position: 75
Position: 100
Position: 125
Position: 150
Position: 175
Position: 200
Position: 225
Position: 250
Position: 275
Position: 300
Position: 325
Position: 350
Position: 375
Position: 400
Position: 425
Position: 450
Position: 475
Position: 500
Position: 525
Position: 550
Position: 575
Position: 600
Position: 625
Position: 650
Position: 675
Position: 700
Position: 725
Position: 750
Position: 775
Position: 800
Position: 825
Position: 850
Position: 875
Position: 900
Position: 925
Position: 950
Position: 975
Position: 1000
Position: 1025
Position: 1050
Position: 1075
Position: 1075
Position: 1075
Action 21:14:54: Setv2InstallUtil.
Action 21:14:54: Setv4InstallUtil.
Action 21:14:54: InstallInitialize.
Action 21:14:54: RemoveExistingProducts. Removing applications
Application: {92E19B5A-1985-49BF-9022-9CF4AD652C72}, Command line: UPGRADINGPRODUCTCODE={38157422-F952-42F7-88AA-CC16A63CD109} CLIENTPROCESSID=9484 CLIENTUILEVEL=3 MSICLIENTUSESEXTERNALUI=1 REMOVE=ALL
DoStep
Action 21:14:54: INSTALL.
1: MySQL Connector Net 6.5.4 2: {92E19B5A-1985-49BF-9022-9CF4AD652C72}
Action 21:14:54: FindRelatedProducts. Searching for related applications
Action 21:14:54: AppSearch. Searching for installed applications
Property: OLDVERSION, Signature: Ver5081
DoStep
Property: OLDVERSION, Signature: Ver507
DoStep
Property: OLDVERSION, Signature: Ver506
DoStep
Property: OLDVERSION, Signature: Ver505
DoStep
Property: OLDVERSION, Signature: Ver504
DoStep
Property: OLDVERSION, Signature: Ver503
DoStep
Property: OLDVERSION, Signature: Ver502
DoStep
Property: OLDVERSION, Signature: Ver501
DoStep
Property: OLDVERSION, Signature: Ver500
DoStep
Property: PREUPGRADEVERSION, Signature: Pre638
DoStep
Property: PERUSERINSTALL, Signature: Reg638
DoStep
Property: PERUSERINSTALL, Signature: Reg644
DoStep
Property: HLM_LOCATION, Signature: HLMRegSearch
DoStep
Property: NETFRAMEWORK20, Signature: NetFramework20
DoStep
Property: NETFRAMEWORK40FULL, Signature: NetFramework40Full
DoStep
Property: VS_2008_PATH, Signature: Find_VS2008_Path
DoStep
Property: VS_2010_PATH, Signature: Find_VS2010_Path
DoStep
Action 21:14:54: SetHLMPath.
Action 21:14:54: LaunchConditions. Evaluating launch conditions
Action 21:14:54: ValidateProductID.
Action 21:14:54: CostInitialize. Computing space requirements
Action 21:14:54: FileCost. Computing space requirements
Action 21:14:54: CostFinalize. Computing space requirements
Action 21:14:54: InstallValidate. Validating install
Min: 0 Max: 1543
Position: 1543
Position: 25
Position: 50
Position: 75
Position: 100
Position: 125
Position: 150
Position: 175
Position: 200
Position: 225
Position: 250
Position: 275
Position: 300
Position: 325
Position: 350
Position: 375
Position: 400
Position: 425
Position: 450
Position: 475
Position: 500
Position: 525
Position: 550
Position: 575
Position: 600
Position: 625
Position: 650
Position: 675
Position: 700
Position: 725
Position: 750
Position: 775
Position: 800
Position: 825
Position: 850
Position: 875
Position: 900
Position: 925
Position: 950
Position: 975
Position: 1000
Position: 1025
Position: 1050
Position: 1050
Action 21:14:54: Setv2InstallUtil.
Action 21:14:54: Setv4InstallUtil.
Action 21:14:54: InstallInitialize.
Action 21:14:55: GenerateScript. Generating script operations for action:
Position: 1051
Position: 1052
InstallInitialize
DoStep
Position: 1053
Position: 1054
Position: 1055
Action 21:14:55: RemoveExistingProducts. Removing applications
Action 21:14:55: ProcessComponents. Updating component registration
Action 21:14:55: MsiUnpublishAssemblies. Unpublishing assembly information
Action 21:14:55: UnpublishFeatures. Unpublishing Product Features
Action 21:14:55: UninstallPerfCounterData.
Action 21:14:55: RemoveRegistryValues. Removing system registry values
Action 21:14:55: RemoveShortcuts. Removing shortcuts
Action 21:14:55: ManagedDataUnInstallSetup.
Action 21:14:55: ManagedDataUnInstall. Unregistering data provider from machine.config
Position: 1056
Position: 1057
Action 21:14:55: RemoveFiles. Removing files
Action 21:14:55: RemoveFolders. Removing folders
Action 21:14:55: CreateFolders. Creating folders
Action 21:14:55: InstallFiles. Copying new files
Action 21:14:55: CreateShortcuts. Creating shortcuts
Action 21:14:55: WriteRegistryValues. Writing system registry values
Action 21:14:55: InstallPerfCounterData.
Action 21:14:55: RegisterUser. Registering user
Action 21:14:55: RegisterProduct. Registering product
Action 21:14:55: MsiPublishAssemblies. Publishing assembly information
Action 21:14:55: PublishFeatures. Publishing Product Features
Action 21:14:55: PublishProduct. Publishing product information

DoStep
Position: 1058
Position: 1059
Position: 1060
Position: 1061
Position: 1062
Action 21:14:55: InstallFinalize.
Action 21:14:55: InstallInitialize.
Action 21:14:55: ManagedDataUnInstall. Unregistering data provider from machine.config
1: MySQL Connector Net 6.5.4 2: {92E19B5A-1985-49BF-9022-9CF4AD652C72} 3: 3
Action 21:14:56: Rollback. Rolling back action:
Min: 0 Max: 88
Position: 88
Unregistering data provider from machine.config
DoStep
Position: -1
Position: -2
InstallInitialize
DoStep
Position: -3
Position: -4
Position: -5
Position: -6
Position: -7
Position: -8
Position: -9
Position: -10
Position: -11
Position: -12
Position: -13
Position: -14
Position: -15
Position: -16
Position: -17
Position: -18
Position: -19
Position: -20
Position: -21
Position: -22
Position: -23
Position: -24
Position: -25
Position: -26
Position: -27
Position: -28
Position: -29
Position: -30
Position: -31
Position: -32
Position: -33
Position: -34
Position: -35
Position: -36
Position: -37
Position: -38
Position: -39
Position: -40
Position: -41
Position: -42
Position: -43
Position: -44
Position: -45
Position: -46
Position: -47
Position: -48
Position: -49
Position: -50
Position: -51
Position: -52
Position: -53
Position: -54
Position: -55
Position: -56
Position: -57
Position: -58
Position: -59
Position: -60
Position: -61
Position: -62
Position: -63
Position: -64
Position: -65
Position: -66
Position: -67
Position: -68
Position: -69
Position: -70
Position: -71
Position: -72
Position: -73
Position: -74
Position: -75
Position: -76
Position: -77
Position: -78
Position: -79
Position: -80
Position: -81
Position: -82
Position: -83
Position: -84
Position: -85
Position: -86
Position: -87
Position: -88
1: MySQL Connector Net 6.8.3 2: {38157422-F952-42F7-88AA-CC16A63CD109} 3: 3

Cannot add Model from Database using EF6 (no replies)

$
0
0
X Your project references the latest version of Entity Framework; however, an Entity Framework database provider compatible with this version could not be found for your data connection. …

I have read many threads in this forum and via Google. I have installed everything in the proper order and copied dlls to the Private Assemblies and the app bin file. Nothing I've tried allows be to add the Model.

There must be something else that 2 days of research have not uncovered. Help would be greatly appreciated.

Environment:
MySql Server 5.6.20
Windows Server 2012 R2

Development Environment
Win 8.1 Pro
VS-2013 Pro Update 3
.Net Framework 4.5.1
EF 6.1.1.0
MySql for Visual Studio plugin 1.2.3
Connector/Net 6.8.3

V4.5 folder dlls copied to ..\Private Assemblies
Added references to
• MySql.Data
• MySql.Data.Entity.EF6
• MySql.Web

Relevant sections of web.config
<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<providers>
<provider invariantName="System.Data.SqlClient"
type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="MySql.Data.MySqlClient"
type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<clear />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient"
description=".Net Framework Data Provider for MySQL"
type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data,
Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
<connectionStrings>
<add name="myaddressEntities3"
connectionString="provider=MySql.Data.MySqlClient;
provider connection string=&quot;server=192.168.2.4;
user id=xxxxxx;password=yyyyyy;
persistsecurityinfo=True;database=myaddress&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>

MySQL Connector/NET 6.9.3 GA has been released (no replies)

$
0
0
Dear MySQL users,

MySQL Connector/Net 6.9.3 is the first GA release for the 6.9.x series of the .NET driver for MySQL. It can be used for production environments.

It is appropriate for use with MySQL server versions 5.5-5.7.

It is now available in source and binary form from http://dev.mysql.com/downloads/connector/net/#downloadsandmirrorsites
(note that not all mirror sites may be up to date at this point-if you can't find this version on some mirror, please try again later or choose another download site.)

Changes in MySQL Connector/Net 6.9.3 (2014-09-03, General Availability)

Bugs Fixed

* Adding a new column to an existing model as identity and PK
failed when applying the migration. The generated error was:
"Incorrect table definition; there can be only one auto column
and it must be defined as a key". (Bug #19286383)

* Calling >MySqlConnection.GetSchema("PROCEDURES WITH
PARAMETERS", ...) would generate an error about a non-existent
index. This affected Intellisense when completing stored
procedures. (Bug #19289402)

The documentation is available at:
http://dev.mysql.com/doc/refman/5.7/en/connector-net.html

Enjoy and thanks for the support!

On behalf of the MySQL Connector/NET and the MySQL/ORACLE RE Team.

.Net Connector Problem (no replies)

$
0
0
I am trying to make a dataset using Dataset Designer in VS.NET 2013.
I have installed "MySql Connector/Net 5.9.3" and "MySql For Visual Studio 1.2.3".
I am trying to call stored procedures.
When using the MySql version is 5.1.x, columns are fetched properly for select procedures.

But when using MySql version 5.6.20 (Latest) or 5.5.x, columns are not fetched.

One difference I have noticed is that with version 5.1.x, names of stored procedures are shown as "ProcedureName (DatabaseName)".
But with version 5.6.20 and 5.5.x, name of stored procedures are shown as "ProcedureName (def.DatabaseName).

I don't know what has changed in the database versions.

mysql-connector-net-6.9.3 bug. (no replies)

$
0
0
In the middle of "ExecuteScalar()" function of MySql.Data.MySqlClient.MySqlCommand in MySql.Data.command.cs source file,
You can see :

1 #if !CF && !RT
2 // give our interceptors a shot at it first
3 if (connection != null &&
4 connection.commandInterceptor.ExecuteScalar(CommandText, ref val))
5 return val;
6 #endif

The problem is at 4, value of connection.commandInterceptor can be null. There is a calling of ExecuteScalar() method WITH OUT validation.
In command.cs, every sentence which calls method of connection.commandInterceptor is used with validation except ExecuteScalar().
So the correction should be :

1 #if !CF && !RT
2 // give our interceptors a shot at it first
3 if (connection != null &&
4 connection.commandInterceptor != null && // Newly inserted.
5 connection.commandInterceptor.ExecuteScalar(CommandText, ref val))
6 return val;
7 #endif

You can say that it's trivial, because people usually call ExecuteReader() or ExecuteNonQuery() rather than ExecuteScalar().
Keep it mind that ExecuteScalar() method also called by MySql connector itself.
When you call MySqlDataAdapter.AddToBatch() to stack your prepared command for batch process.
Call flow would be :

MySql.Data.MySqlDataAdapter.AddToBatch() // dataadapter.cs
commandToBatch.GetCommandTextForBatching() // command.cs
MySqlCommand.ExecuteScalar().ToString();// command.cs, need to know @@sql_mode to make more precise SQL sentence..
// Oops !, it calls ExecuteScalar().

Connectors from 6.5.7 to 6.9.3 with commandInterceptor facility have the problem. Before 6.5.7 free from it.
I wish I'm wrong.

Any suggestions ?

FK indentifier is too long (1 reply)

$
0
0
Hi, I am running EF6.1.1 and MySQL connect 6.9.3

when running update-database for a code first project I get the following error. Is there a way to force identifiers to be shorter? A setting? Any other suggestions?

MySql.Data.MySqlClient.MySqlException (0x80004005): Identifier name 'FK_LoggerProgram_LoggerProgramBlob_LoggerProgramBlob_LoggerProgramBlobID' is too long
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()

Thanks,

Karl

Query Takes approx 82 seconds in Workbench and 3 minute 30 seconds in program (no replies)

$
0
0
I'm using connector/net to run a query that basically counts the number of records and groups them by month. On MySQL Workbench it takes between 80 and 90 seconds to execute. I copy pasted the script/query from Workbench onto my MySQLCommand in my code and then used ExecuteReader to run it. The output is just 7 rows with two columns, but it's taking around 3 minutes and 15 seconds to execute when I run it from my program. That's 195 seconds. Why?!?! :)

I'm updated to 6.9.3. I've already spent a couple of hours searching Google for answers. I'd appreciate any input on why the drastic difference in execution time.
Viewing all 1447 articles
Browse latest View live