mysql-connector

IDataReader empties when viewing for a second time

Hi, I'm getting something pretty strange going on when trying to read some data using the MySql .net connector. Here's the code: IDataReader reader = null; using (MySqlConnection connection = new MySqlConnection(this.ConnectionString)) { String getSearch = "select * from organization"; MySqlCommand cmd = new MySqlCommand(getSe...

What is the difference between a Provider and a Connector in database world?

I create an new text file, rename it to test.udl and double click on the file. This brings up the OLE DB connection string dialog box. The first tab shows a list of providers installed on my machine. I need a MySQL Connection string, but I do not have a MySql provider in the list. So I download MySql ADO.NET Connector from the internet a...

How do I use MySQL C++ Connector for storing binary data?

I have a block of binary data defined as: void* address, size_t binarySize; that I want to store to a MySQL database using MySQL C++ Connector. The function setBlob() takes istream. The question: How can I convert from a raw void* address, size_t binarySize to either an istream object or istringstream? Is it possible to do this with...

geographic layers in mysql

I am looking for an implementation of MySql and Geographic layers (features\rasters), how does it work for you? which ORM \ dataaccess you are using? how do you write the geo-queries? as sql or in code ...

How can I determine the column type represented by a MySql .Net Connector's MySqlDateTime structure?

DataColumn.DataType returns FullName = "MySql.Data.Types.MySqlDateTime" regardless of the type of the column it represents, if it is either DATE, TIME, or DATETIME. Clearly I can query the information_schema.columns table, though I'm hoping that the connector library stores this detail somewhere that I just can't find in the documentati...

Is MySQL Connector/Net backward compatible?

If I have a MySQL server 5.1, can I use all the onnectors from version 5.1 and above?: Connector/Net 6.1 Connector/Net 6.0 Connector/Net 5.2 Connector/Net 5.1 Clicking http://dev.mysql.com/downloads/connector/net/ defaults to 6.0... ...

Connect to mysql 5.0 database using pure vbscript?

I've tried the below script but I am getting an error: dim cn, rs set cn = CreateObject("ADODB.Connection") set rs = CreateObject("ADODB.Recordset") cn.connectionstring = "Provider=MysqlProv; Data Source=Adonis; User Id=mysqluser; Password = mysqlpass;" cn.open rs.open "select * from Countries", cn, 3 rs.MoveFirst while not rs.eof ...

Is MySQL C++ Connector access to remote database possible?

I am accessing a MySQL database within a C++ app using MySQL C++ Connector. It works fine if I have the C++ and the MySQL on the same machine. So, something like the following code works fine: sql::Connection *_con; sql::mysql::MySQL_Driver *_driver; _driver = sql::mysql::get_mysql_driver_instance(); _con = _driver->con...

MySQL Connector: parameters not being added

Hey all! Looking at my query log for MySQL, I see my parameters aren't being added. Here's my code: MySqlConnection conn = new MySqlConnection(ApplicationVariables.ConnectionString()); MySqlCommand com = new MySqlCommand(); try { conn.Open(); com.C...

MySQL Connector/C++ Library Linking ERROR Problem

PROBLEM: Ok, I've been TRYING to follow the sample code on the MySQL Forge Wiki and some other websites that offer a tutorial on how to get a simple database connection, but for some reason, my project always fails at a linking error and I can't figure out why or how to fix it myself (I'm still learning). PLEASE HELP ME! I've included t...

How do I modify the source code of the MySQL Connector and install it on my PC?

In short, what are the steps that one needs to take in order to modify the source of the connector and install it in Windows? I have the MySQL Connector/.NET Version 6.1.2 installed on my machine, but I'm getting an exception for every DateTime with a value of '0000-00-00'. This exception breaks my application. As I solution, I downlo...

Configuring com.mysql.jdbc.log.Log4JLogger for multiple data sources

I've configured the MySQL connector for Java to report metrics using: logger=com.mysql.jdbc.log.Log4JLogger&gatherPerfMetrics=true&reportMetricsIntervalMillis=60000 That works just fine for one data source, but when I have three there is no way to distinguish them, since they all look like: 2009-11-13 12:37:05,506 INFO MySQL ** Perfo...

mySql Connector exception (C++ library for mysql) when inserting row into non-empty table

I have not done much database programming at all. I am working from some example code for using MySQL Connector/C++. When I run the following code I get a crash on the last line in some std::string code - but it ONLY crashes when the table is not empty. If the table is empty, it inserts the row and works fine. If the table is non emp...

How do I update a value in a row in MySQL using Connector/C++

I have a simple database and want to update an int value. I initially do a query and get back a ResultSet (sql::ResultSet). For each of the entries in the result set I want to modify a value that is in one particular column of a table, then write it back out to the database/update that entry in that row. It is not clear to me based o...

How do i connect to a remote mysql server in .NET?

I am using ubuntu in VMWare. I installed mysql and have it running. I can login with the user root and a password. I have the IP of the VM box. In my code i wrote using MySql.Data; return new MySql.Data.MySqlClient.MySqlConnection("username=root;data source=192.168.100.129,password=xyz"); instead of data source i also tried server. I g...

MySQL: Removing duplicate columns on Left Join, 3 tables

I have a table that uses 3 foreign keys into other tables. When I perform a left join, I get duplicate columns. MySQL says that the USING syntax will reduce the duplicate columns, but there aren't examples for multiple keys. Given: mysql> describe recipes; +------------------+------------------+------+-----+---------+-------+ | Fiel...

Losing results when iterating over 1 to many table

My dilemma is that I am losing my ResultSet from the primary table when accessing a foreign key table. I need to save the results from the first table query while I query another table. Scenerio: I am implementing a recipe database system. Each recipe can have 1 to many ingredients. To resolve the 1 to many relationship, I created ...

Raise an event from MySQL and handle it from VB.NET (or something similar)?

I'm working with MySQL 5.1.39 and Visual Studio 2008 and connecting both with MySQL Connector Net 6.1.2. What I'd like to do is once a MySqlConnection object is created, be able to handle the "event raised" when a field in a specific row in a given table is updated. I mean, when that value in that table has been manually changed or mod...

MySQL: Appending records: find then append or append only.

I'm writing a program, in C++, to access tables in MySQL via the MySql C++ Connector. I retrieve a record from the User (via GUI or Xml file). Here are my questions: Should I search the table first for the given record, then append if it doesn't exist, Or append the record, and let MySQL append the record if it is unique? Here is...

Connecting/Checking a MySQL database in C#

Can someone provide with me some code to connect to a MySQL database and check the whole of one column to see if it is less than 2? I've looked online and have found nothing which can help. Thanks so much, Lawrence ...