In VS 2008 using VB I am using the standard calendar. In my program the user will be changing the date, especially between months, before entering new data. The problem I have is that when you change just the month, the calendar does not give you a new date until you select a specific day of the month. Thus if I go from October 14th back to September, there is no new date as a result of that event. Ideally it should default or give you the oportunity to allow it to defualt to the 1st day of the month. Is there anyway around this. I don't want my users to have to change the month then select a date. I would like the code: m = MyCal.SelectedDate.Month to assign the month to m when the month is changed.
I am stored date in "smalldatetime" datatype as in databse.How can i particular textbox entered date(dd-mm-yyyy) used to fetch the row information from databse and shown in a gridview.
I would like to develop an application which shows upcoming dates which is stored in database. I have a label control namelyNext Payment Date in which i want to store that upcoming date(next due date). Eg : if the value stored in db are :(dd/mm/yyyy) 22/12/2010, 15/12/2010,18/12/2010. and if todays date is 10/12/2010.. i want to display 15/12/2010 in that Next Payment Date label..
So how can i do this.using vb.net. what will be the SQL Query and how do i implement this
I have a Timestamp column in my Table. I want to read the date time value and display in UI.
In Linq the Timestamp column is represented as System.Data.Linq.Binary.
I dont know how to retirve date time value in "MM-dd-YYYY" format from this Linq.Binary
- Why I am using Timestamp?.
I want to perform some operations based on the last modified date time of the particular row. Since I am using TimeStamp column in my Table as version column, It will contain the last modified date details, So i want to read the date time value from this time stamp column to do some other operations.
I have some code that returns my LastPasswordSet date when I use my administrator account on my development machine using localhost but when I deploy to me test server and I get an exception "Object reference not set to an instance of an object" [Code].... [Code].... Any ideas?
How to create Jobs, I am using SQL 2005, i need a query which should get current date and compare current date with date in table and Send Email according to Job scheduled.
How to get the date at which a record is created in SQL?..i.e, if i add a record to a database table db1 at 8/10/2010 11:30, I want to get the datetime, i.e 8/10/2010 11:30..;.Also let me know how to compare datetime values..
if(8/10/2010 11:30 >8/10/2010 10:30) will work or not?
but if there were no "hits" for a particular date range in the last week i only get the dates returned where there were hits. i need to get all the days returned and where there were no results, i need a zero returned.
I am storing date data in sql server as varchar but I want to make comaparisons on this field in where clause- like this field from 2 days before or after etc
I have this ListView that has a Drop Down List.Everything works fine (I think/hope) except that the drop down list are not showing its result correctly.This is the code.
Front-End [Code]....
The code behind consist of the page_load and the ItemDataBound [Code]....
I'm having a problem with my Linq to XML query. I'm getting the result data I want, but it's nested so deep that there must be a better way.Here is my XML:
[Code]....
I'm trying to get a list (simple string[]) of all Item IDs where Category Names contains "Other".Here is my Linq:
[Code]....
[Code]....
Here is a snapshot of my result from Visual Studio:The results I want are there ("item100", "item400", "item500"), but buried so deeply in the results var.
I am looking for an example where I create CTE, and then using the result of first CTE, I create another CTE.With CTE1 as ( Col1, Col2, Col3)
( --SOME RECURSIVE QUERIES )
select Col1, Col2, Col3 from CTE1 where Col3 >100I want to now use the above query inside a recursive CTE2. One way is to store the above result in a temp table and use the temp table in a new CTE but I am NOT looking for temp table solution here. May be wrap the above result in another CTE, but I am missing the syntax.
There is a certain query that is being called from an ASP .NET page. I studied the execution plan of that query in Management Studio and 87% is for a sort. I badly need the sorting or else the data displayed would be meaningless.
Is there anyway that I can request SQL Server to cache a sorted results set so it will return the data faster in consequent runs?
Or is SQL Server smart enough to do the cache handling and am I doing mistake by trying to force it to cache results, if that is possible?
UPDATE:
I just read in an article that creating a View with a clustered index will increase performance because the index will persist the data in a view to disk. Is this true? How do i get about doing this?