Ho provato questa connessione ma mi da errore
Come mai?


strSql = "SELECT * FROM nome";
strConn = "Driver={MySQL ODBC 3.51 Driver};Server=127.0.0.1;Database=prova;uid=;pwd=; option=3";
OdbcConnection myConnection = new OdbcConnection(Driver={MySQL ODBC 3.51 Driver};Server=127.0.0.1;Database=prova
;uid=;pwd=;option=3);
OdbcDataAdapter myCommand = new OdbcDataAdapter(SELECT * FROM nome, myConnection);
DataSet ds = new DataSet();
myCommand.Fill(ds, "nome");
myConnection.Close();



------------------
Errore di compilazione
Descrizione: Errore durante la compilazione di una risorsa necessaria per soddisfare la richiesta. Rivedere i dettagli relativi all'errore e modificare in modo appropriato il codice sorgente.

Messaggio di errore del compilatore: BC30451: Nome 'strSql' non dichiarato.

Errore nel codice sorgente:



Riga 8:
Riga 9: <%
Riga 10: strSql = "SELECT * FROM nome";
Riga 11: strConn = "Driver={MySQL ODBC 3.51 Driver};Server=127.0.0.1;Database=prova;uid=;pwd=; option=3";
Riga 12: OdbcConnection myConnection = new OdbcConnection(Driver={MySQL ODBC 3.51 Driver};Server=127.0.0.1;Database=prova


File sorgente: d:\inetpub\wwwroot\SQL\index.aspx Riga: 10