che vuol dire???
Index 0 is either negative or above rows count.
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: System.IndexOutOfRangeException: Index 0 is either negative or above rows count.
---
Classe Accesscodice:string sql = "SELECT * FROM tbl WHERE id= " + Request.QueryString["id"]; string fotpic = Access.visRecord4(sql).DefaultView[0]["fotopiccola"].ToString();
L'errore me lo da qui (string fotpic = Access.visRecord4(sql).DefaultView[0]["fotopiccola"].ToString()codice:public static DataTable visRecord4 (string SQL) { SqlConnection conn = new SqlConnection(connString); SqlDataAdapter da = new SqlDataAdapter(SQL, connString); DataTable myTable = new DataTable(); da.Fill(myTable); return myTable; }
Il valore id riusltato so con certezza che sarebbe una stringa tipo pippo.jpg pluto.jpg ecc...


Rispondi quotando

