executenonquery Questions
4
Solved
Simple question, is it possible to achieve this query this with Entity Framework when updating one entity?
update test set value = value + 1 where id = 10
Hildy asked 16/3, 2009 at 20:12
2
Solved
I am using a stored procedure to insert some value in table.
CREATE PROCEDURE [dbo].[Sp_InsertValue]
@Val1 as nvarchar(50)
@Val2 as nvarchar(50)
as
BEGIN
IF NOT EXISTS(SELECT * FROM @mytable WHER...
Melisandra asked 17/10, 2011 at 12:59
6
Solved
I am currently working on a C# project and I am running an insert query which also does a select at the same time, e.g.:
INSERT INTO table (SELECT * FROM table WHERE column=date)
Is there a way ...
Valerievalerio asked 7/4, 2012 at 23:19
3
Solved
In my C# project, I'm using System.Data.SQLite.dll downloaded from CodeProject.
My problem is as per the title - how to get the error codes after calling SqliteCommand.ExecuteNonQuery() function?
...
Buckjumper asked 27/6, 2012 at 9:21
2
Solved
For some reason, ExecuteNonQuery() in C# returns -1, though when I run a query separately, the value returns the actual value needed.
For Example:
try
{
var connString ="Data Source=ServerName;...
Girl asked 27/6, 2016 at 18:10
5
I have created a simple program to insert values into the table [regist], but I keep getting the error
Incorrect syntax near ')'
on cmd.ExecuteNonQuery();:
private void button1_Click(object...
Losing asked 26/11, 2012 at 21:23
1
I am trying to run ExecuteNonQuery using transaction, but I keep getting this error
OleDbException : ExecuteNonQuery requires the command to have a
transaction when the connection assigned to t...
Coltun asked 12/2, 2016 at 7:7
4
Solved
Ive used this method before to return the amount of rows changed. I am it to run an insert method, the insert runs fine in the stored procedure, but the return value from ExecuteNonQuery() always r...
Arrhythmia asked 14/11, 2011 at 16:49
2
I am using ExecuteNonQuery to run an insert proc, it returns 2, but in actual I am inserting only 1 record. I am getting 1 extra due to trigger. Is there anyway that I get only actual number of row...
Courthouse asked 25/8, 2015 at 10:48
1
Solved
Trying to figure out if it's best to use ExecuteScalar or ExecuteNonQuery if I want to return the identity column of a newly inserted row. I have read this question and I understand the differences...
Dailey asked 9/1, 2013 at 21:21
2
Solved
I have the following bit of code which runs a SQL statement:
int rowsEffected = 0;
using (SqlConnection dbConnection = new SqlConnection(dbConnectionString))
{
try
{
dbConnection.InfoMessage +=...
Hyperphagia asked 15/3, 2012 at 16:18
3
Solved
I know this is not a hell of an useful question but I can't help being bugged by it.
So,
Why said method (in *Command classes) is called
ExecuteNonQuery instead of ExecuteQuery?
Aren't those SQL ...
Beverie asked 14/5, 2010 at 12:26
1
© 2022 - 2024 — McMap. All rights reserved.