So I inserted some data on my table, ran a Select Count(*) query, and showed the result, it was 120, then I deleted the data of the table from sqldeveloper, ran my VB project again with the same query as before just to test if it worked ok, and to my surprise it returned the same value as before! Still 120, although the same exact Select Count query does return 0 from sqldeveloper, I already closed the project and opened it again, no change. What could be happening?
This is my query code:
sql.CommandText = "select count(*) from mytable"
sql.CommandType = CommandType.Text
sql.Connection = conexion.con
test = Convert.ToInt32(sql.ExecuteScalar().ToString())
TextBox1.Text = test.ToString()
test is an Integer variable, the reason I convert it to an Integer is because I want to evaluate the result and decide what to do based on the number returned by the query.
VB.NET 3.5 and Oracle10g XE
I’ll answer this myself just in case anyone else encounters this issue in the future, indeed as the commenters have said, you have to COMMIT everything you do on SQLdeveloper before expecting to see any actual changes in the database, just as if it was an actual SQL Transaction.
Thanks to the people that commented on this.