En un alerta, pero no me resulta.
Código C Sharp:
Ver original
while (sqlReader.Read()) { // MessageBox.Show("sqlReader.GetValue(1)"); MessageBox.Show(sqlReader(0)); }
Código C Sharp:
Ver original
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SQLite; using System.IO; namespace mostrar { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { string connetionString = null; SQLiteConnection sqlCnn; SQLiteCommand sqlCmd; string sql = null; connetionString = "Data Source=mibase.sqlite;Version=3;New=True;Compress=True;"; sql = "Select * from mitabla"; sqlCnn.Open(); SQLiteDataReader sqlReader = sqlCmd.ExecuteReader(); while (sqlReader.Read()) { // MessageBox.Show("sqlReader.GetValue(1)"); MessageBox.Show(sqlReader(0)); } sqlReader.Close(); sqlCmd.Dispose(); sqlCnn.Close(); } } }