Top "Sqlcommand" questions

Represents a Transact-SQL statement or stored procedure to execute against a SQL Server database which is used in Microsoft .NET.

expects parameter '@ID', which was not supplied?

I am sending ID as outparameter but its giving error System.Data.SqlClient.SqlException: Procedure or function 'usp_ClientHistoryItem' expects …

c# .net database sqlcommand
How to pass variable into SqlCommand statement and insert into database table

I'm writing a small program in C# that uses SQL to store values into a database at runtime based on …

c# sql sqlcommand executenonquery
I'm getting an error in SQL command not properly ended

when I enter this INSERT INTO works_on (essn, pno, hours) values ('123456789', 1, 32.5), ('123456789', 2, 7.5), ('666884444', 3, 40.0), ('453453453', 1, 20.0), (…

sql oracle11g sqlcommand
How to insert the elements of an array into a SQL Server database using C#?

I need to insert the weather forecast (temperature) into a SQL Server database in order to control remotely the heating …

c# sql sql-server arrays sqlcommand
How to set isolation level on SqlCommand/SqlConnection initialized with no transaction

The following method is supposed to peroform a dirty read on an open connection. There are no transactions. Where do …

sql sql-server tsql sqlcommand isolation-level
How to Close a DataReader on Exception

I have the following code in some methods of my Data Layer: StringBuilder sb = new StringBuilder(); SqlCommand s = new SqlCommand(…

c# .net-1.1 sqldatareader sqlcommand
Pass string array as parameter in SQL query in C#

In my application written in C# , I am writing a SQL query. Following is the query SELECT [Resource No_] where […

c# sql-server sqlcommand sqlcommandbuilder
Create SQL Server table programmatically

I need to programmatically create a SQL Server 2008 table in C# such that the columns of the table should be …

c# sql-server-2008-r2 sqlcommand
C# multiple parallel inserts in database

I have a datatable with around 3000 rows. Each of those rows need to be inserted in a database table. Currently, …

c# multithreading ado.net sqlcommand
Data Adapter Vs Sql Command

Which one would be better in executing an insert statement for ms-sql database: Sql DataAdapter or SQL Command Object? Which …

c# asp.net sql sqlcommand sqldataadapter