Salve, io ho questo codice:
using System;
using System.Data;
using System.Data.Odbc;
/// <summary>
/// Demonstrates how to work with SqlConnection objects
/// </summary>
class program
{
static void Main()
{
// 1. Instantiate the connection
OdbcConnection conn = new OdbcConnection(
"DSN=EXAMPLES");
OdbcDataReader rdr = null;
try
{
// 2. Open the connection
conn.Open();
// 3. Pass the connection to a command object
OdbcCommand cmd = new OdbcCommand("select * from fatture", conn);
//
// 4. Use the connection
//
// get query results
rdr = cmd.ExecuteReader();
// print the CustomerID of each record
while (rdr.Read())
{
Console.WriteLine(rdr["nome"]);
}
}
finally
{
// close the reader
if (rdr != null)
{
rdr.Close();
}
// 5. Close the connection
if (conn != null)
{
conn.Close();
}
}
}
}
Ma quando l'ancio il programmino lession01
Mi salta questo errore:
Error in my_thread_global_end(): 1 threads didn't exit
Però i dati li visulizza lo stesso ,
e cercando l'errore su google ho visto che è questo:
http://www.keyo.biz/error_in_my_thread_global_end.php
però io la libmysql.dll non c'è l'ò. perchè io ho installato mysql 5.067-essetc. per windows.
come mai esce questo errore?.
grazie.