Ciao a tutti,
questa volta mi sto spingendo a studiare l'ASP.NET con il C# e devo effettuare una connessione ad un database MySQL locale.
Uso questo codice:
Dopo aver premuto quel pulsante mi esce questo errore:codice:protected void Button1_Click(object sender, EventArgs e) { try { SqlConnection cn = new SqlConnection("Data source=localhost;" + "Database=myDBtest;" + "Password=pw;" + "Connect Timeout=5;"); cn.Open(); } catch (Exception ex) { lbl.Text = ex.Message; } }
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Non capisco proprio i dati credo di averli inseriti tutti correttamente...per sicurezza ho anche copiato il database nella cartella bin del progetto.

Rispondi quotando
