sqlcommand
My stored procedure returns something, but sqlDataAdapter.Fill leaves datatable empty
Something stopped working in my application. I tested my stored procedure and it does return 3 rows (too big to repost here). At the output in Visual Studio it says afterwards:[详细]
2023-02-21 01:08 分类:问答ReadOnlyException DataTable DataRow "Column X is read only."
I\'ve got a short piece of code that originally created an SqlDataAdapter object over and over. Trying to streamline my calls a little bit, I replaced the SqlDataAdapter with an SqlCommand and moved[详细]
2023-02-19 14:26 分类:问答SqlParameter ParameterDirection
A developer asked me tod开发者_如何转开发ay if there are disadvantages or risks while setting all SqlParameters for a SqlCommand to ParameterDirection.InputOutput. I coudn\'t think of any expect maybe[详细]
2023-02-19 10:40 分类:问答Passing a parameter to an sql stored procedure in c#
string commandGetIslemIdleri = (\"EXEC GetIslemIdleri\"); cmd = new SqlCommand(commandGetIslemIdleri, sqlConn);[详细]
2023-02-19 01:17 分类:问答From .NET can I get the full SQL string generated by a SqlCommand object (with SQL Parameters)?
From the .NET environment can I get access to the full SQL string that is generated by a SqlCommand object?[详细]
2023-02-17 13:53 分类:问答stored procedure (Visual Studio ASP.Net 2005 C#)
I made a stored procedure called \"usp_insertempdata\" that inserts data into the database table called \"Employee\", so i executed it and when i save data i brings an exception:[详细]
2023-02-11 05:43 分类:问答SQL - how to replace a range of datetimes with a single, future datetime?
This is a basic SQL datetime question, but I don\'t want to mess my database up! For example, in a MySQL database, if I want to replace all datetime values between date X and date Y in a single colum[详细]
2023-02-10 01:36 分类:问答ADO.NET: do you have lots of stored procedure in your own systems?
hi all We do know that CommandType property of a SqlCommand object has 3 options: TableDirect, Text and StoredProcedure or \"SP\".[详细]
2023-02-07 12:43 分类:问答Get an error message from TSQL output clause with SqlDataReader
I have the following SQL INSERT INTO [dbo].[table1] ([val1], [val2]) OUTPUT INSERTED.* VALUES (@val1, @val2)[详细]
2023-02-06 06:48 分类:问答ExecuteScalar throws NullReferenceException when calling a stored proc that returns 1
I\'ve done some research before posting this question and I\'m aware of the fact that when there\'s no data returned, ExecuteScalar will throwa System.NullReferenceException. That is why I modified my[详细]
2023-02-05 13:48 分类:问答