Tema: mysql y C#
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 26/11/2009, 10:29
marian_156
 
Fecha de Ingreso: noviembre-2009
Mensajes: 5
Antigüedad: 14 años, 6 meses
Puntos: 0
Respuesta: mysql y C#

hola RODNO!!!!

RegistroPat mov FeMov sector numcred ce Fe periodo feAlta --------- esTOS SON LOS CAMPOS DE MI Bd

E24-10046-10 6 18/06/1986 24 091114949 02 11/2006 31/07/2009
E24-10326-10 1 15/12/1982 00 091114965 02 07/2009 31/07/2009
E24-10326-10 1 15/12/1982 00 091114965 02 07/2009 31/07/2009


estos son ejemplos de lo que contiene el archivo de texto, son por supuesto mas registros y diferentes archivos de texto con diferente nombre. Lo k hago ya es jalar mi txt y cargarlo en el datagridview

//BOTON PARA EXAMINAR EN DONDE ESTA MI TXT Y PONERLO EN UN TEXTBOX!!!!!!!!!!11
private void bExaminar_Click(object sender, EventArgs e)
{
openFileDialog1.InitialDirectory = "c:\\";
openFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
openFileDialog1.FilterIndex = 2;
openFileDialog1.RestoreDirectory = true;

if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
txtDirFile.Text = openFileDialog1.FileName;

}
}
//BOTON PARA CARGAR EÑ ARCHIVO TXT EN EL DATAGRIDVIEW!!!!!!!!!!!!!!!!!!!!!
private void bCargar_Click(object sender, EventArgs e)
{
if (txtDirFile.Text != "")
{
string texto;
int count = 14;
string[] split = null;

try
{
StreamReader tr = new StreamReader(txtDirFile.Text);
while ((texto = tr.ReadLine()) != null)
{
//this.textBoxPwd.Text += texto;

split = texto.Split(new Char[] { ',', ':', ';', ' '}, count);
dataGridView1.Rows.Add(split[0], split[1], split[2], split[3], split[4], split[5], split[6], split[7], split[8], split[9], split[10], split[11], split[12], split[13]);
split = null;

}
MessageBox.Show("Le archivo se cargo correctamente", "OK", MessageBoxButtons.OK, MessageBoxIcon.Information);

}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
else
{
MessageBox.Show("Seleccione un archivo y un delimitador", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}



lO QUE KIERO ES K APARTE DE K EL TXT ME CARGE EN EL DATAGRIDVIEW, K TAMBIEN SE CARGE EN MI BASE DE DATOS K YA CREE CON LOS CAMPOS K PUSE EN LA PARTE SUPERIOR, PARA YO PODER HACER ASI MI BUSKEDA!!!
O NO SE SI SE PUEDA QUE DIRECTAMENTE DEL DATAGRIDVIEW SE HAGA LA BUSKEDA CON FILTROS SIN MI BASE DE DATOS.

RECORDAR K LA INFORMACION CAMBIA CONTINUAMENTE!!!!