Quantcast
Channel: MySQL Forums - MySQL for Visual Studio
Viewing all 417 articles
Browse latest View live

Connect/C Visual Studio 2013 (1 reply)

$
0
0
Does anyone have any information concerning Visual Studio 2013 and MySQL Connect/C 6.1.5 (or later)? Does VS2013 support it? Four months ago, it would not link. Has there been any further work on this combination of tools? ISn't there a full build of the server with vs2013 by now? I have not seen any evidence of it. Very disappointed. Where have all the C coders gone? Please post here if you have any info at all, thanks.

EF6 Code First with MySQL (3 replies)

$
0
0
Hi,

I am new to this forum so hello.

I am using Visual Studio 2012 with Entity Framework 6 Code First approach with a MySql Database.

So I created a context with just one entity model to try it out how it goes. I then enabled migrations from the Package Manager Console. I than created an intialiser to insert test data.

so I give update-database command on the Package Manager console and everythings works perfect the database does not exist so it is created with the __migrationhistory table and my one single entity with the test data and everything.

Now I modify the entity say I change the MaxLenght of Property from 50 to 20. When I perform an update datbase again the Package manager console gives me this error :


System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at MySql.Data.MySqlClient.MySqlConnectionStringBuilder.<.cctor>b__7(MySqlConnectionStringBuilder msb, MySqlConnectionStringOption sender)
at MySql.Data.MySqlClient.MySqlConnectionStringBuilder.get_Item(String keyword)
at MySql.Data.MySqlClient.MySqlConnectionStringBuilder.GetConnectionString(Boolean includePass)
at MySql.Data.MySqlClient.MySqlConnection.get_ConnectionString()
at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<GetConnectionString>b__12(DbConnection t, DbConnectionInterceptionContext`1 c)
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.GetConnectionString(DbConnection connection, DbInterceptionContext interceptionContext)
at System.Data.Entity.Internal.InternalConnection.GetStoreConnectionString(DbConnection connection)
at System.Data.Entity.Internal.InternalConnection.OnConnectionInitialized()
at System.Data.Entity.Internal.EagerInternalConnection..ctor(DbContext context, DbConnection existingConnection, Boolean connectionOwned)
at System.Data.Entity.DbContext..ctor(DbConnection existingConnection, Boolean contextOwnsConnection)
at System.Data.Entity.Migrations.History.HistoryContext..ctor(DbConnection existingConnection, String defaultSchema)
at MySql.Data.Entity.MySqlEFConfiguration.<.ctor>b__1(DbConnection existingConnection, String defaultSchema)
at System.Data.Entity.Migrations.History.HistoryRepository.CreateContext(DbConnection connection, String schema)
at System.Data.Entity.Migrations.History.HistoryRepository.<GetUpgradeOperations>d__16.MoveNext()
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
at System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration)
at System.Data.Entity.Migrations.DbMigrator.<>c__DisplayClassc.<Update>b__b()
at System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
at System.Data.Entity.Migrations.Infrastructure.MigratorBase.EnsureDatabaseExists(Action mustSucceedToKeepDatabase)
at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration)
at System.Data.Entity.Migrations.Infrastructure.MigratorBase.Update(String targetMigration)
at System.Data.Entity.Migrations.Design.ToolingFacade.UpdateRunner.Run()
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate)
at System.Data.Entity.Migrations.Design.ToolingFacade.Run(BaseRunner runner)
at System.Data.Entity.Migrations.Design.ToolingFacade.Update(String targetMigration, Boolean force)
at System.Data.Entity.Migrations.UpdateDatabaseCommand.<>c__DisplayClass2.<.ctor>b__0()
at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
The given key was not present in the dictionary.


I wish to use this combination because I want to keep the models in sync with the database easily. Am I doing something wrong or I'm missing something.

Thanks in advance.

You can use MySQL for Visual Studio in Visual Studio 2013 Community edition (no replies)

$
0
0
New post at the blog

You can use MySQL for Visual Studio in Visual Studio 2013 Community edition

A lot a great announcements were done today at the Visual Studio Connect event. And one of the things we are more excited about is hearing that there is a new edition of Visual Studio: Visual Studio 2013 Community.

Read more:

https://blogs.oracle.com/MySqlOnWindows/entry/you_can_use_mysql_for

Possibly Stupid question (no replies)

$
0
0
I just upgraded to current/latest editions of MySQL connector.net, Server, and VisualStudio integration.

I downloaded Visual Studio 2013 community ed.

Then I went to upgrade a VB project from circa 2005.

Visual Studio converted the project ok ... except it does not have the connector.net dependency listed in the project as far as I can tell. How do I re-add the MySQL.net connector to this project?

The errors look just like a reference to the connector routines is not being found. (7 warnings 102 errors).
-----------------
Warning 1 Namespace or type specified in the project-level Imports 'MySql.Data.Types' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. ProfitMaster
Warning 2 Namespace or type specified in the project-level Imports 'Interop.QBFC7' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. ProfitMaster
Warning 3 Namespace or type specified in the project-level Imports 'MySql' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. ProfitMaster
Warning 4 Namespace or type specified in the project-level Imports 'MySql.Data.MySqlClient' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. ProfitMaster
Warning 5 Namespace or type specified in the project-level Imports 'MySql.Data' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases. ProfitMaster
Error 6 Type 'MySqlDataReader' is not defined. C:\Bill Angus\My Documents\Visual Studio 2005\Projects\profitmaster\ProfitMaster\PM_Module.vb 147 20 ProfitMaster
Error 7 Type 'MySqlCommand' is not defined. C:\Bill Angus\My Documents\Visual Studio 2005\Projects\profitmaster\ProfitMaster\PM_Module.vb 148 24 ProfitMaster
Error 8 Type 'MySqlDataReader' is not defined. C:\Bill Angus\My Documents\Visual Studio 2005\Projects\profitmaster\ProfitMaster\PM_Module.vb 157 20 ProfitMaster

LINQ to Entity (no replies)

$
0
0
Hello,

I use mySQL Tools for Visual Studio. I get Data from a view in mysql (5.6) and fill an Datacontext with LINQ to entities.

My problem:
The entity model designer needs an primary key to work. But a view in mysql has no key. So i defined a key in the table of the modell designer.

When the view from the mySQL comes with data, that is not unique and have a conflict with the key in my datamodel, then happened the following thing: There is no error message and the Software will exit. The mySQL driver fill the datamodel with other data that is not consistent. Is this a bug? Sorry for my bad english. Can i explain it in german?

Mfg

Björn Reichard

"Create new MySQL MVC project" failed (no replies)

$
0
0
I've tried to "create new MySQL MVC Project" After installing Visual Studio community 2013 and installing MySQL server, MySQL workbench and its connector with MySQL installer. (the connection with my database is ok, it works)
But during de creating the project I get the message "The input string is not in correct format" en creating the project fails.
Can any buddy explain what is the problem?

mysql winform wizard crash (5 replies)

$
0
0
Hi All!

When i create a new mysql winform wizard project in the visual studio 2013 always crashing with these errors:

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: devenv.exe
Problem Signature 02: 12.0.31101.0
Problem Signature 03: 54548724
Problem Signature 04: mscorlib
Problem Signature 05: 4.0.30319.34014
Problem Signature 06: 52e0b679
Problem Signature 07: e94
Problem Signature 08: 99
Problem Signature 09: System.FormatException
OS Version: 6.3.9600.2.0.0.256.48
Locale ID: 1038
Additional Information 1: cd9c
Additional Information 2: cd9cb2d30d5f29261a0d6e6e53771dd6
Additional Information 3: 5e3b
Additional Information 4: 5e3ba1957d30d8a6e303b2aacb978273

I use .net connector 6.9.5, mysql for visual studio 1.2.3, mysql server 5.6.17.
What is the problem?

ASP: Select statement problem (1 reply)

$
0
0
Hello,
when I use the following code:
rsOpenStr = "select * from inventory where instr(description," & kwStr &")>0"
rs.Open (rsOpenStr)

if I enter a number in the text box -- 1972 for example, the select statement executes.
If I enter a string -- birds for example, I get the following error:
Unknown column 'birds' in 'where clause'.
If I replace kwStr in the instr function with 'birds' the select statement executes as desired.

Can anyone help please?

Authentication with old password no longer supported, use 4.1 style passwords. (1 reply)

$
0
0
I have a Windows desktop application written in vb.net coded in Visual Studio 2010. I am migrating it over to Visual Studio 2013 but I am having issues with the MySQL .Net connector in the VS2013. Opening a new project in VS2013 I create a new dataset and when I connect to the hosted MySQL I get the error "Authentication with old password no longer supported, use 4.1 style passwords." The MySQL server hosted is version 5.0.9. The current MySQL .Net connector in VS2013 is 6.5.7. My old VS2010 connector is 6.3.6 and works. I have tried the SQL statements "SET PASSWORD for <username> = PASSWORD('new password')" which I found on many Google searches and that has not worked.

Building mysql x86 project (2 replies)

$
0
0
if i try to build my c++ mysql project in x86 i get these errors

1> mysql.cpp
1>mysql.cpp(63): warning C4101: 'sbuffer' : unreferenced local variable
1>mysql.obj : error LNK2001: unresolved external symbol _mysql_init@4
1>mysql.obj : error LNK2001: unresolved external symbol _mysql_real_connect@32
1>mysql.obj : error LNK2001: unresolved external symbol _mysql_error@4
1>mysql.obj : error LNK2001: unresolved external symbol _mysql_query@8
1>mysql.obj : error LNK2001: unresolved external symbol _mysql_store_result@4
1>mysql.obj : error LNK2001: unresolved external symbol _mysql_num_fields@4
1>mysql.obj : error LNK2001: unresolved external symbol _mysql_fetch_row@4
1>mysql.obj : error LNK2001: unresolved external symbol _mysql_fetch_lengths@4
1>C:\Users\Dickyb0b\documents\visual studio 2010\Projects\mysql\Release\mysql.exe : fatal error LNK1120: 8 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.06
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

it works fine for x64, i dont really want an x64 binary so i would like to build my project as x64, i believe my mysql installer is x86 yet i am able to build my project as x64 which is not what i wanted, can anyone help?

Install MySQL with Application (no replies)

$
0
0
Hi,
I'm looking for information for how to install a MySQL database when I install my Visual Studio C# application on another computer.

80004005 Fatal error unable to write data to the transport connection (no replies)

$
0
0
Hi,

I have a vb.net app which generally runs fine. But if it is up and running for a long time will get an error - which I have a screen shot of, but I see no way to attach a file to this message. So here goes (this is not verbatim) ...Fatal error encountered during command execution -> IOException: Unable to write data to the transport connection; An established connection was aborted by the software in your host machine -> Socket Exception: An established connection was aborted by the software in your host machine at yada yada yada.

The error message points to this source statement:

Dim sqlReader As MySqlDataReader = sqlCmd.ExecuteReader()

I strongly suspect that the problem relates to the fact that the connection usually gets used only once every 24 hours. I also suspect that the fix may involve TCPIP rather than MySQL. But I would have no idea where to look within TCPIP.

Can anyone here help me with this. I'd be grateful.

Thanks, Bob

unespected error 0x8000405 (no replies)

$
0
0
Hi Folks,

I am trying to create a mvc 3 Project using VS 2013 and MYSQL.
I am using mysql conector 6.9.3 and MySql for Visual Studio 1.2.3 with one computer.]
With another computer I use conector 6.9.5 and MySql for Visual Studio 1.2.3.

Both machines could not create the Project and display "Unespected error H_Result 0x8000405.

Can anyone help me?

TIA

Moises Durovni

Timeout with consolidate procedure (2 replies)

$
0
0
Hi everybody,

I've a problem to execute a specific query using MySQL libraries for C#.

Premise my c# software executes many queries without problems (included delete, insert and select statements), I can't execute a DELETE INNER JOIN query.

The query is the following:

delete vt.*
from valore_titolo vt inner join
(select
vt.id_titolo,
date(vt.datetime) as ext_date
from valore_titolo vt,
(select id_titolo, date(datetime) as data_dt
from valore_titolo
where time(datetime)='23:59:59') vt_daily
where vt.id_titolo = vt_daily.id_titolo
and date(vt.datetime)=vt_daily.data_dt
and time(vt.datetime)!='23:59:59'
group by vt.id_titolo, date(vt.datetime)) t_join
on vt.id_titolo=t_join.id_titolo and vt.datetime=CONCAT(ext_date,' 23:59:59');

If I execute it from "MySQL Workbench" it runs in less than 1 second; If I try to run it using my software, timeout occurs and it doesn't produce effects on db datas.

I tried to put the query into a procedure and execute it but nothing change: I can call it by Workbench, timeout occurs using c# libraries

string query = "call eliminaDailyInutili;";
MySqlCommand cmd = new MySqlCommand(query, connection);
cmd.CommandTimeout = 20;
cmd.ExecuteNonQuery();

Any ideas? Thanks :(

Visual Studio Mysql Syntax error (no replies)

$
0
0
When added Datasource with using Mysql Datasource , it added [ ] SQL syntax.
So it doesnt work.

Select * from [table_name] ----- error

how can i fix it?

mySQL connection string problems using visual studio 2013 (2 replies)

$
0
0
I am new to mySQL. I have always used MS SQL in the past. I can't seem to get my conncetion string working. Here is my connection string:

<add name="MRIXXX" connectionString="server=localhost; User ID=xxxh; Password=Xyyyyy99; database=HiXXXXXXXDB" providerName="System.Data.SqlClient"/>

And here is my C# code where I try to connect:

string connString = ConfigurationManager.ConnectionStrings["MRIXXX"].ConnectionString;

MySqlConnection connection = new MySqlConnection(connString);
MySqlCommand command = connection.CreateCommand();
MySqlDataReader Reader;
string thisrow = "";
command.CommandText = "select * from Products";
connection.Open();
Reader = command.ExecuteReader();
while (Reader.Read())
{
for (int i = 0; i < Reader.FieldCount; i++)
thisrow += Reader.GetValue(i).ToString() + ",";
//gvProducts.Rows.Add(thisrow);
}

lblProductID.Text = thisrow;
connection.Close();

I get this error when I run it:

[MySqlException (0x80004005): Authentication to host 'localhost' for user 'xxxh' using method 'mysql_native_password' failed with message: Access denied for user 'xxxh'@'localhost' (using password: YES)]

What am I doing wrong?

Question:My sql for visual studio and Sp4 working? (2 replies)

$
0
0
Is the My sql for visual studio 100% compatible with

Visual Studio 2013 Sp4?

I have the basic wizard project working in sp2, sp3, but not sp4 yet.

please advice.


Thanks
Techjunkie

C# Project with MySql database connection (2 replies)

$
0
0
Hi everyone. I have a project in c# which uses a MySql database. I created a setup file for project using InstallShield Limited Edition for Visual Studio 2013. I included MySql.Data.dll file in project, but I receive MySql error connection when try to run program on another computer who doesn't have MySql service. My question is, is there any possibility to use MySql database like this and use it without having MySql service on?

MySQL Visual Studio f1.2.3 causes visual studio 2013 to crash when creating a new connection to an MS SQL Database (3 replies)

$
0
0
I need to connect to both MySQL and MSSQL databases from Visual Studio. I can connect to MSSQL databases no problems unless the MySQL for Visual Studio is also installed.

When the MySQL (1.2.3) plugin is installed, creating a connection for an MSSQL database proceeds as normal, the "test connection" even works, as does selecting the schema. Finishing the wizard ALWAYS causes an exception.

The reported exception is CL20r3. After attaching a debugger, the following is reported on the exception
"Missing Server and User in Credentials".

There is no credential issue unless the MySQL connector is installed.

There is no issue connecting to MySQL databases.

The MSSQL is SQL Express with a named instance on the local machine. All is in the local environment.

Server Error: Cannot perform CAS Asserts in Security Transparent methods (1 reply)

$
0
0
Hi there

I have a problem with a very simple .net Webapplication. I just would like to show a simple GridView that connects to a MySQL-DB on a remote server. On my local host, everything works fine. But on my remote server, there's always the following error:


Cannot perform CAS Asserts in Security Transparent methods
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.


In my bin-folder, there are two DLL-Files, both in Version 6.9.6:
- MySql.Data.dll
- MySql.Web.dll

My Web.config looks like this (part of it):

<connectionStrings>
<add name="connVAT" connectionString="server=xxx;user id=xxx;database=xxx;password=xxx;persistsecurityinfo=True"
providerName="MySql.Data.MySqlClient" />
</connectionStrings>

and an other part:

<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data" />
</DbProviderFactories>
</system.data>


I really don't have any idea, why this error occurs. Especialy because there's no problem on my localhost.

Any help on this toppic would be highly appreciated.
Viewing all 417 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>