Dovrebbe essere una cosa molto semplice invece no.
Ho una pagina che è simile ad una già creata e funzionante quindi ho fatto un bel copia e incolla della pagina, compilo tutto ok, vado a vedere e...
Ho provato a rinominare cmd in cmd2 e dr in dr2 ma l'errore persiste! Nell'altra pagina ho controllato e la connessione è regolarmente chiusa.codice:You have an error in your SQL syntax near '' at line 1 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: MySql.Data.MySqlClient.MySqlException: You have an error in your SQL syntax near '' at line 1 Source Error: Line 34: MySqlCommand cmd = new MySqlCommand(SQL, connection); Line 35: Line 36: MySqlDataReader dr = cmd.ExecuteReader(); Line 37: Line 38: if (dr.HasRows) Source File: c:\Inetpub\wwwroot\miosito\inserisci.aspx.cs Line: 36
Sonia

Rispondi quotando
