ciao ragazzi,
ho questo codice ma mi restituisce un errore strano...
il messaggio d'errore è questo:Codice PHP:
private void ResizeAndSave(Stream imgStr,int Width, int Height,string FileName)
{
MySqlConnection connection = new MySqlConnection();
connection.ConnectionString = "Data Source=localhost; Database=sup; User ID=admin; password=rda";
//connection.Open();
System.Data.SqlClient.SqlCommand cmd = new SqlCommand("SELECT id_foto from fotografie order by id_foto DESC", connection);
try
{
connection.open;
SqlDataReader myReader = cmd.ExecuteReader();
int id = Myreader("id_foto");
}
catch(Exception e)
{
Console.WriteLine("Exception Occured -->> {0}",e);
}
qualche idea !?escription: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'SqlCommand' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 15: //connection.Open();
Line 16:
Line 17: System.Data.SqlClient.SqlCommand cmd = new SqlCommand("SELECT id_foto from fotografie order by id_foto DESC", connection);
Line 18: try
Line 19: {




Rispondi quotando