Top "Executescalar" questions

- Executes a query, and returns the first column of the first row in the query-result set.

ExecuteScalar() returns null altough data was added to DB

I have a code as bellow where I try to insert a data into a table and return the ID (…

c# sql tsql ado.net executescalar
Can you use cmd.ExecuteScalar when the sproc uses RETURN @value

Can you use int blah = Convert.ToInt32(cmd.ExecuteScalar()); When the sproc's last statement does: RETURN @value I can only …

c# ado.net executescalar
Run multiple commands in one ExecuteScalar in Oracle

I have a batch of sql statements such as ... insert into.... ; insert into.... ; delete .........; etc When i try to execute …

sql oracle executescalar ora-00911
Returning List<int> from Database

I have a simple problem that I have not been able to find an answer to despite much Googling. Perhaps …

c# sql-server list executescalar
Sqlite ExecuteScalar throwing NullReferenceExcpetion

I have a custom written DB provider. When I run my tests, they're breaking on the ExecuteScalar command with a …

c# sqlite nullreferenceexception executescalar