|
Hi All,
I want to display the last Access Date and Time of the record from the table, Every time (or) every access of that record.
I need the query for that using sql server 2005.
Logu
|
|
|
|
|
If, in your database table, you have a field that stores the Last Access Date and Time then you will just need a select statement for e.g.
SELECT LastAccessDateTime FROM myTable WHERE myRecordID = 'SomeRecordId'
If you don’t have a field that stores that value then you might want to add the field in the table and use Triggers to update that field or you could also do it programmatically.
HTH
Robert
|
|
|
|
|
I want to extend built-in Role Provider to enable certain features to certain Roles.
In asp database (SQL) i added two tables Features and RoleHasFeatures with correct implementations.
I tried few things when building a custom role provider:
1. I inherited from SqlRoleProvider and added functions that will work with my features ( AddFeature,.....)
2. I built custom provider from scratch and also added functions that will work with my features ( AddFeature,.....)
In both cases there is a problem i can't solve.
How can i access my provider within code?
What i want to do is, lets say, in some aspx page to write this
MyRoleProvider.AddFeature( textbox1.text );
I tried casting various objects but i couldnt find the right one
Any ideas?
|
|
|
|
|
Hi All,
I have created a control.
So please help me in getting the query and i m using SQL server 2005.
I have a table in which i have 100 records. I need a query to display a single record per day ie., for the 100 days i have to display 100 days and then on the 101th day the 1st record should come.
So please help me in getting the query and i m using SQL server 2005.
With Regards,
Logu
|
|
|
|
|
Do you mean per each day you have to return one record, and for 100 days you have to return 100 records??
|
|
|
|
|
yes. Absolutely if there is 100 records it will be displayed for 100 days. and on the 101st day the first record should be displayed again.
and my datebase schema is
MessageID : int
Message : varchar(MAX)
DisplayDate: datetime.
Logu
|
|
|
|
|
Where are the 'days' coming from ? Do you mean you want to start today, and every day, show one ? To do that, you need a start date. Then, the easiest thing to do would be to use the % operator to get the number of days since the start, mod 100, and pass that as an Id to a simple query, return * from myTable where MessageId=xx
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I want to get the days from the server and i need the code for that too becoz the date and time may vary so i want to set the date and time in the server.
Logu
|
|
|
|
|
You have to specify startdate and enddate to get top 1 record
e.g.
select top 1 * from tablename where [date]=dateparameter
plz give me more inputs to face-out on this
|
|
|
|
|
Hi,
The Start Date is taken care by the server. And every day we have to show single record on every postback (or) Refresh. If there may be 100 records then 100 dates will be created bt the server and them on the 101st day the server will create the 101st date but there will not be any message in the table so at that 101 date it should display the 1st message which is shown on the first day.
So i need a query for displaying the message.
Logu
|
|
|
|
|
Sorry, but still I'm not clear...
You mean that you want to display only one message based on last date??
|
|
|
|
|
Hi,
If there is 10 records with the Server date, and if there is no record on the 11 row ,it should display the first record with the 11 th day date which is the server date.
I hope this will give a clear idea.
Logu
|
|
|
|
|
Could this be
SELECT TOP 1 * FROM TableName ORDER BY [date] desc
Sorry if i didn't understand yet
|
|
|
|
|
Thanks for your help.I have got the answer.
Logu
|
|
|
|
|
I would like to share me that answer if you don't mind.
|
|
|
|
|
What have you already written ? What do you mean by 'a record per day' ? What's 'the 100 days', just an example ?
What is your database schema ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
For Everypost back i am getting different messages. But i want only one message per day for every postback. And i want to know the query for that and my database schema is
MessageId : Int
Message :varchar(Max)
Dispalydate: datetime
Logu
|
|
|
|
|
Hi guys,
Is it possible to execute Batch files and executable files on the server using ASP.NET assuming i have all necessary and directory permissions. I would also like to be able to pass arguments and get the return code.
|
|
|
|
|
try to use System.Diagnostics.Process.Start
|
|
|
|
|
Is TextBox Supports Databound?
I want to display(& modify) a field into a textbox. I don't want to use DetailView or GridView controls. Is it possible using AccessDataSource control and a TextBox?
Please Suggest a least manual code solution.
dutta
|
|
|
|
|
Do you have only one text box and in which only only one text or line ?
Means why you want to bind data with text box ?
<l>Thanks and Regards
Sandeep
|
|
|
|
|
Hi all,
Does anybody have an idea of how do we create an editable dropdownlist and shows a panel with values starting with letters the user types.I want something similar to that of a browsers address bar or the search dropdown provided by google toolbar. I cant`t use any third party control or Ajax toolkit. Is there any other option of doing this in .NET itself??
|
|
|
|
|
Why do you want Editable dd
you can do it with Textbox also put the selected text to be changed in the textbox and edit it
<l>Thanks and Regards
Sandeep
|
|
|
|
|
Sorry but u r not getting me.I want to give a textbox or a editable DD which on text changed should show a panel containing a list box with values starting from the letter typed.You can have a look at the DD provided by google toolbar.
|
|
|
|
|
HI friends
I am getting error while i am inserting record in database.
Records are aroung more than 60,000. I also tried timeout property of command object I want diff solution ....
Error Detail:
Timeout expired . Timeout period elapsed prior to completion or server is not responing
Thanks And regards
Yogesh M
|
|
|
|