Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey

All Questions

Tagged with
0 votes
1 answer
283 views

Null Value not getting stored in database of column type datetime

So here is portion of the code: if (String.IsNullOrEmpty(strStartDate.ToString())) { myCommand.Parameters.AddWithValue("@job_start_date", DBNull.Value); } else { myCommand.Parameters....
Tom Larry's user avatar
  • 151
0 votes
2 answers
966 views

Multiple async tasks causing duplicates on SQL Server insert stored procedure

I have a multithreaded application that loops through queues and grabs the data and sends this data to a stored procedure where it is inserted into my table. The problem is occasionally this data is ...
Terrance Jackson's user avatar
0 votes
1 answer
98 views

Allow only onward date and block backward date

How I will restrict a user to enter only max date of the previous entered date? I want to enter only onward date and block backward date in SQL and c#.net in windowform? In the blow image textbox &...
Aamir17072's user avatar
0 votes
2 answers
4k views

Sql server Cursor vs While Loop performance

I have used Sql server Cursor. i have insert 10K record in db and insert multiple table in related some data but take some time so any suggestion for how to increase some speed in sql server. Which ...
Jayesh Rana's user avatar
1 vote
2 answers
178 views

Merge Three Tables and get one output using SQL query

I have below candidate table details Table_TraineeInfo TraineeID BatchId Name Mobile -------------------------------------------------- 243 45 demo201 ...
Mr doubt's user avatar
-3 votes
2 answers
1k views

Cannot update DateTime field in MSSQL Server

I have an update clause in my ASP.NET MVC project and I just want to update single field using current time. I know I could also use GETDATE(), but I need to pass the date parameter from Service layer....
Jack's user avatar
  • 1
0 votes
1 answer
260 views

How to search grid view using registered date column using sql query

How to search grid view using date column? In a SQL Server database, I have a table Priority with 3 columns id, name and registered date. For registered date, default value is getdate() which ...
Ganesh's user avatar
  • 11
0 votes
1 answer
536 views

SQL Server DataReader.GetField returned null instead of geography data

I have a Microsoft SQL Server 2008 (SP3) database. I was able to write some geospatial data into a table using the Geography data type. I am now trying to read the data out of the database but I am ...
megabytes's user avatar
  • 125
2 votes
5 answers
193 views

Subtract previous row value to current row and order by date

Data as follows in my table SELECT ID, VALUE, acc_no, adate FROM TB_DailyStatement id value acc_no adate --------------------------------------------- 1 12 1 2019-...
Grape Master's user avatar
-2 votes
2 answers
159 views

Is there any user defined / customized FORMAT and TRY_CAST?

I am working with SQL stored procedures. Below FORMAT and TRY_CAST getting this error. 'TRY_CAST' is not a recognized built-in function name. SELECT FORMAT(TRY_CAST(MYDATE AS INT),'00/00/0000') ...
Arulmurugan K's user avatar
7 votes
2 answers
544 views

Validation failed for one or more entities in Entity Framework for nullable boolean property

My class looks like this, I added new property IsModified which can be nullable. I can create a new entity of type A using only Name and Key property, but when I try to update key for any existing ...
user3014311's user avatar
0 votes
1 answer
811 views

SQL Timeout is longer than I set it

I use SqlConnection in C# and I open the connection with sqlconnection.Open() to a VM were MSSQL runs on it. If the credentials are correct, the connection is available below a second. But if e.g. the ...
TheKrogrammer's user avatar
0 votes
3 answers
163 views

insert code error

insert into customer (Advance,status) values(@Advance,@status) where Name='" + txtcname.Text.Trim() + "'"; in the above insert statement in going to insert 2 values based in condition but i'm getting ...
preetham acharya's user avatar
1 vote
1 answer
3k views

SQL Server Image column to html

I have a table with all employee pictures in SQL Server table. Column is of type Image I have a requirement to download emplyee profile in word format with their picture in it. I was able to export ...
Prasanth Kumar Vinakota's user avatar
1 vote
1 answer
313 views

Alignment issue when string contains non-alphanumeric characters like Chinese or Japanese

I'm working on small program written in C# where it will it will query the result from the Database and show it in text file format. I have a problem when the result contains non-alphanumeric ...
tickwave's user avatar
  • 3,415

15 30 50 per page
1
2 3 4 5
58