Ver Mensaje Individual
  #2 (permalink)  
Antiguo 10/08/2005, 18:07
Avatar de stone_neo
stone_neo
 
Fecha de Ingreso: abril-2004
Ubicación: Peru
Mensajes: 438
Antigüedad: 20 años, 10 meses
Puntos: 15
Mira lo primero que tienes que haces es ir a www.mysql.com y bajarte el MySQLDriverCS.

Luego cuando crees tu programa no te olvides de agregar la referencia a este ensamblado, luego en la siguiente seccion le aumentas el using a mysql

using System;
using System.Drawing;
using System.Windows.Forms;
using MySQLDriverCS;//Esta es la referencia

Ahora para hacer una conexion y una consulta aki tienes un ejemplo

Código:
MySQLConnection mysql=new MySQLConnection(new MySQLConnectionString("tu_host","tu_base_de_datos","tu_usuario","tu_pass").AsString);
mysql.Open();
MySQLCommand comando=new MySQLCommand("SELECT * FROM tu_tabla",mysql);
MySQLDataReader reader=comando.ExecuteReaderEx();
while(reader.Read())
System.Console.WriteLine({0},reader.GetString[0]);

Recuerda poner este codigo entre un bloque Try Catch
__________________
Rubén Darío Huamaní Ucharima
Web : http://www.gorilla-soft.com
Usuario Linux #382 100 :-)