sqlcommand Questions

6

Solved

I've a windows forms application with MS SQL Server 2005 as the back end. I have written code in the form to call few stored procedures using SqlConnection, SqlCommand objects and i properly dispos...
Outdoor asked 9/6, 2010 at 19:13

2

Solved

I have a problem with the folowwing piece of code. I am passing a parameter (List<SqlParameter>) to a method executing the following code. When it executes SQL Server throws an error saying ...
Goldofpleasure asked 6/5, 2010 at 11:34

4

Solved

I am using Java on Windows XP and want to be able to send commands to another program such as telnet. I do not want to simply execute another program. I want to execute it, and then send it a seque...
Witchcraft asked 20/5, 2010 at 20:37

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

2

Solved

I am creating an automated DB Query Execution Queue, which essentially means I am creating a Queue of SQL Queries, that are executed one by one. Queries are executed using code similar to the foll...

3

Solved

I have a SQLCommand : "Update Customers Set Name = @name where code = @code" and this code: cmd.Parameters[0].Value = "بهروز";//(some Unicode characters) cmd.Parameters[1].Value = 1; cmd...
Babbage asked 2/1, 2010 at 20:14

2

Solved

If I run a stored proc using the SqlCommand and the SqlCommand times out does the StoredProc continue to execute or does it get force to quit when the SqlCommand disconnects?
Abiosis asked 11/11, 2009 at 14:46

8

Solved

Per my other question here about Disposable objects, should we call Close() before the end of a using block? using (SqlConnection connection = new SqlConnection()) using (SqlCommand command = new ...
Gainer asked 28/7, 2009 at 18:21

2

Solved

We have some lists of data being fetched in our application via a SqlCommand performing a SELECT query on a SQL Server database. We do not explicitly setup a transaction on the SqlCommand, instead ...
Golter asked 19/6, 2009 at 9:7

1

Solved

I have the following code that uses the SqlClient.ExecuteScalar method to return an ID from a table. using (var conn = new SqlConnection(connectionString)) using (var cmdContrib = new SqlCommand(...
Fingerstall asked 9/6, 2009 at 1:33

5

Solved

What's the best method to pass parameters to SQLCommand? You can do: cmd.Parameters.Add("@Name", SqlDbType.VarChar, 20).Value = "Bob"; or cmd.Parameters.Add("@Name", SqlDbType.VarChar).Value = ...
Lysenko asked 16/11, 2008 at 0:56

© 2022 - 2024 — McMap. All rights reserved.