ExecuteNonQuery returns 1 , Database wont Update
hello i am creating a Windows Application
C# 3.5
when i executeing function to insert into SQL Epxress
it returns 1 on the Rows Effect but checking the Database Data nothing is inserted.
public int ExectueNonQuery(string command)
{
int Results = -1;
try
{
connection = new SqlConnection(ConnectionString);
connection.Open();
scommand = new SqlCommand(command, connection);
Results = scommand.ExecuteNonQuery();
}
finally
{
scommand.Dispose();
if (connection != null)
connection.Close();
}
return Results;
}