mysql-connector

Nant cant find assembly in the GAC

Hi, I have a .Net project which uses the MySQL connector which is located in the GAC. In my Nant build file there doesnt seem to be a way to tell CSC to look in the GAC to find this dll (or type information) and my project wont build. Is there a way to tell Nant that this reference does exist and its in the Gac. Its wierd really becau...

how to use a MySql database within Eclipse

I am very new to programming, so please bear with me, and apologies in advance if at first I dont make sense...! I am doing an undergrad programming project, and need to make some databases within a Java program. I am using eclipse (galilo) to write my program. I have downloaded a connector/J, but havent the foggiest how i should use ...

How do I setup ASP.NET MVC 2 with MySQL?

Is it possible to setup ASP.NET MVC 2 to work with a MySQL database? ...

MySQL Exception - Fatal Error Encountered During Data Read

I am working on a C# console program that grabs large numbers of records from a table, runs them through a medical grouper, and then updates each of the records. It uses MySQL Connector/NET 5.2.7. The way it works is that I grab chunks of data at a time (i.e. 20,000 rows) using SQL_BUFFER_RESULT to avoid locks. Each record is run through...

MySql BulkCopy/Insert from DataReader

I am loading a bunch of rows into MySql in C#. In MS Sql I can feed a DataReader to SqlBulkCopy, but the MySqlBulkCopy only presents itself as a bootstrap for a bulk load from file. So, my current solution is using a prepared command in a transacted loop. Is there a faster way to accomplish bulk loading of MySql using a DataReader sour...

Is there any (performance) difference between Debug and Release?

I'm using MySql Connector .NET to load an account and transfer it to the client. This operation is rather intensive, considering the child elements of the account to load. In Debug mode, it takes, at most, 1 second to load the account. The average would be 500ms. In Release mode, it takes from 1 to 4 seconds to load the account. The ave...

Identifying which value of a multi-row inserts fails foreign key constraint

I have a multi-row insert that looks something like: insert into table VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9); Assume the first attribute (1, 4, 7) is a foreign key to another table and assume that this referenced table does not have the value '4'. A MySQLExeption is thrown with error code 1452. EXCEPTION: Cannot add or update a ch...

Seeing many "SHOW VARIABLES" in MySQL Process List

Every few hours, My MySQL database (running 5.1) seems to hang and viewing the processlist shows dozens of processes running "SHOW VARIABLES". They finish instantly only to be replaced my more of these processes. After a few minutes, everything disappears and goes back to normal. I'm using the .Net Connector and the web application is o...

Installing multiple MySQL .NET Connectors

Hi all, I currently have MySQL .NET Connector version 6.2.3 installed. I'd like to try out Database Manager from within IIS7, however, the dependency is on MySQL .NET Connector 5.2. When running the MySQL .NET Connector 5.2 installer, it says there's already an existing MySQL .NET Connector installed, and that this version can not be in...

MySQL, C++: Retrieving auto-increment ID

I have a table with an auto-incrementing ID. After inserting a new row, I would like to retrieve the new ID. I found an article that used the MySQL function LAST_INSERT_ID(). The article says to create a new query and submit it. I'm using MySQL Connector C++, Windows XP and Vista, and Visual Studio 9. Here are my questions: Is ...

Getting MySQL record count with C#

Hello, I would like to know how can I get record count of a query with C#. Here is the code that I use.. MySqlDataReader recordset = null; query = new MySqlCommand("SELECT * FROM test ORDER BY type_ID ASC", this.conn); recordset = query.ExecuteReader(); while (recordset.Read()) { result.Add(recordset["typ...

Invalid Argument to getUInt64 when retrieving LAST_INSERT_ID()

I have added a record to my table which auto-increments the primary key. I am having no luck retrieving this new value. The MySQL documents say to use the SELECT LAST_INSERT_ID(); in a query. I have done this, but can't retrieve the results. According the the metadata of the result set, the data type is BIGINT and the column name i...

How to make Django work with MySQL Connector/Python?

Has anyone made Django work with myconnpy? I've checked out http://github.com/rtyler/connector-django-mysql but the author said it's very outdated and not supported. If you've managed to make Django work with myconnpy, please share your experience. Thanks. ...

MySQL Connector Linker Problem

Hey, I'm trying to compile a program with the MySQL C++ Connector but somehow I can't get the linking right. The errors I get are: mysql/lib/libmysqlcppconn.so: undefined reference to `std::ios_base::ios_base()@GLIBCPP_3.2'.... etc locations: libmysqlcppconn.so: mysql/lib/ libmysqlclient.so: /usr/lib/ I tried to follow...

Using Perfmon with MySQL Connector/NET

I am trying to diagnose repeated lock wait timeouts from my ASP.NET app to MySQL 5.1. I'm using MySQL Connector/NET 6.2.3. I don't see anything MySQL-related in Perfmon's Performance Object dropdown list. What else can I do to try to diagnose these issues? ...

ASP.NET error when trying to configure ListView + SqlDatasource for a MySql Table

Hi, i'm using ASP.NET + a MySql Db. I'm trying to configure a ListView so i've written: <asp:SqlDataSource ID="dsDatiUtente" runat="server" ConnectionString="Server=12.28.136.29;Database=mydb;Uid=m111d1;Pwd=fake;Pooling=false;" ProviderName="MySql.Data.MySqlClient" SelectCommand="SELECT * FROM user WHER...

MySql Connector prepared statement only transfers 64 bytes

I am using the MySql Connector C++ to store a JPEG image from a file into the database. I am using the prepared statement. After execution of the prepared statement, only the first 64 bytes of the file are copied into the database. My research of examples show that no iteration is necessary and the examples assume that the prepared ...

How can I transfer data between 2 MySQL databases ?

I want to do that using a code and not using a tool like "MySQL Migration Toolkit". The easiest way I know is to open a connection (using MySQL connectors) to DB1 and read its data. Open connection to DB2 and write the data to it. Is there a better/easiest way ? ...

Storing Config Values

Wondering if I am going about this the right way. I am creating a C# application that loads a few variables from my App.Config.xml file. I am loading these into a "config" class (Config.cs) along with other variables that I am loading from a MySQL database. This is what my class looks like so far: class Config { public s...

undefined reference to 'get_driver_instance'

I'm getting "undefined reference to 'get_driver_instance'" when building even the most simple example from: http://dev.mysql.com/doc/refman/5.1/en/connector-cpp-examples-complete-example-1.html. It builds and runs fine on my local machine but it won’t build on the server – seems like linking mysql library issue. This is my build cmd: g++...