SQL Server :: Time Change In Sql / Query?
i need change time in sql ... but i dont query.. please any one give me query..how to change timing in sql...
View 5 Replies (Posted: Jul 19, 2010 04:52 AM)
Sponsored Links:
Related Forum Messages For ASP.NET category:
How To Calculate Time As User Can Change Server Time
I am trying to implement a license in which we will provide a license file which will be placed on the server root directory.This license file contain encrypted strings which have ServerName, Concurrent Sessions , Timeperiod.n this i have two issue.How could i calculate time as user can change server time.How could i maintain the concurrent login sessions [because i can't catch the event hen user close the browser].I will welcome any tehcnique otehr then javascript solution.[even polling] but i can't save session information in database
Posted: Apr 08, 2010 08:43 PM
View 2 Replies!
View Related
Different Execution Time For Same Query - SQL Server?
I have a query: Select a from tbl_abc where id in ( select id from tbl_xyz where mainid = 12) When I am executing this query, it is taking 1-2 seconds to execute, but when I am using the same query in stored procedure, the below query is taking more than 5 minute: If(Select a from tbl_abc where id in ( select id from tbl_xyz where mainid = 12)) BEGIN -- CREATE TEMPORARY TABLE [Say: #temp1] #temp1 => Select a from tbl_abc where id in ( select id from tbl_xyz where mainid = 12) inserting the same value in the temp table drop #temp1 END what could be the reason of this? and how can I resolve this? I am running the SP from asp.net
Posted: Jan 28 at 6:23
View 3 Replies!
View Related
SQL Server :: DataAdapter/SQLDataReader Takes Lot Of Time For Executing A Query?
I have a webpage with 6 drop down lists. User can start with selecting any drop down list first, and then proceed in any order. 1. Assume when the 1st dropdown is selected first, rest 5 drop downs (except 1st) are filtered/updated based on the selected value in the 1st dropdown.2. Assume user selects the 4th dropdown second, rest 5 drop downs (except 4th) will be filtered/updated but the condition would be based on both 1st drop down and 4th drop down. But while filtering the first drop down, only the 4th drop down is used as filter (self-filter will be ignored). The code works fine but I see a very bad performance hit in time when the user selects the fourth dropdown after selecting three drop downs. I tried using both SQLDataAdapter and SQLDataReader but neither used to solve the issue. The code takes a lot of time on one line in either of the code (which is highlighted below). When I run the query in SQLServer Mgmt Studio, the query completes in a few seconds. [Code]....
Posted: Aug 31, 2010 03:36 AM
View 5 Replies!
View Related
SQL Server :: Multitable Query After A Dropdownlist Item Change?
Im trying to get gridview to update always when changing to different value in dropdownlist. I get my dropdownlist values from database, so for example I have 3 choices there (name1,name2,name3)The problem is that I need to get results for that gridview from 3 different tables. I know how to query those in behind-code file and bind it to a gridview for example..but I dont know how to get it work if I have it also binded on dropdownlist where it should get the name* valuebefore being able to print the results from 3 different tables to the gridview depending of the name* value..And I can't have both DataSource and DataSourceId defined on just 1 gridview..I am using Sqlserver database, asp.net 3.5 with c#
Posted: Aug 10, 2010 04:20 PM
View 3 Replies!
View Related
Forms Data Controls :: Each Time The Page Is Refreshed This Time Would Change?
I have a simple gridview that is using a select statement to retrive data from my table including the getdate() value. i.e there is a record of the data and time each record was placed on the system. I would like to create a calculated field in my gridview that tells the user the amount of time the record has been on the system in days,hours,mins..i.e[ Date/Time record created] - [ Date/Time Now]...each time the page is refreshed this time would change..how can this be done?
Posted: Nov 13, 2009 11:44 AM
View 3 Replies!
View Related
SQL Server :: Sub Query In Cross Table Query To Create Statistics
I am trying to create statitics for game downloads and am having dificulty with a sub part of my query. the goup by command is not having the disired result and i think i have been looking at it too long to see what i am doing wrong. [Code].... At the moment it is producing each result in many rows when only 4 rows should appear. its the download column that is doing it. needs to be sub queried or something to display total in relation to month,gameid,userid. Month-download-GameID-UserID 1 1 1 1 1 1 1 1
Posted: Mar 02, 2011 08:28 PM
View 2 Replies!
View Related
SQL Server :: Query Slow In Loading / Trying To Display Query Result?
I am trying to display this query result in an aspx page. It is very slow in loading. Here is the query. The inner query inside the outer quesry is the problem.(Please see the underlined part in the query) - (If I remove that part it is very fast.) select top 500 --This column is the issue ,Governing_Class=( case when exists (select top 1 tqc.class_code from t_quote_class tqc inner join t_quote_class_premium tqcm on tqc.class_code =tqcm. class_code where tqc.appid=pi.appid and tqc.class_code not in('8742' ,'8810','7380') order by tqcm.premium_amt desc ) then ( select top 1 tqc.class_code from t_quote_class tqc inner join t_quote_class_premium tqcm on tqc.class_code =tqcm. class_code where tqc.appid=pi. appid order by tqcm.premium_amt desc ) ......... From tables
Posted: Feb 01, 2011 07:24 PM
View 7 Replies!
View Related
Databases :: Oracle Query Convert To Sql Server Query
I am a biggner in SQL DB . but i started a complicated and painfull work in SQL SERVER 2008. the problem convert Oracle hierarchical query to SQL query. the query SELECT DISTINCT LEVEL LVL, SCH.NSCHEDULE_SL, SCH.NSCHEDULE_SL_FM, SCH.CSHED_CNAME FROM FA_SCHEDULES SCH WHERE LEVEL = 1 AND NSCHEDULE_SL_FM IS NULL AND NBRANCH_SL = 2 CONNECT BY PRIOR SCH.NSCHEDULE_SL_FM = SCH.NSCHEDULE_SL AND NBRANCH_SL = 2
Posted: Sep 03, 2010 07:23 AM
View 1 Replies!
View Related
User From Different Contries Creat Blogs, The Displayed Time For Respective Blog Will Be A Server Time?
I have one web site and server that is hosted on "Pacific Standard Time" Zone . When a user from different contries creat blogs the displayed time for respective blog will be a server time.the code below is what i am using for conversion.. TimeZoneInfo PTZone = TimeZoneInfo.FindSystemTimeZoneById( "Pacific Standard Time" ); lbl_createonvalue.Text = TimeZoneInfo.ConvertTime( DateTime.Parse( incident.CreatedOn.ToString() ), PTZone, TimeZoneInfo.Local ).ToString( "MM/dd/yyyy" ); But i want Date Time to be displayed on respective timezones.Is there any Javascript that can handel conversion at client side or any other code that works good for my scenario?
Posted: Jun 16 09
View 3 Replies!
View Related
Security :: How To Add Query String In URL At Run Time
[URL]UserFiles/ArticlesFiles/633574997433655321_Raja_images.jpg when I click any of secure page like (user page , admin or user ) and I am not login then it will show me in url like this http://localhost:59847/FormsAuthenticationAdvanced/login.aspx?ReturnUrl=/FormsAuthenticationAdvanced/secure/securepage.aspx & displays login form. After login it will redirect me to that respective page which I clicked ( like if secure page is clicked before login then after login it will redirect me to secure page ).
Posted: Jul 18, 2010 10:21 AM
View 1 Replies!
View Related
Databases :: How To Get Query Execution Time
I need to find out the query execution time from the front end .Where should I insert the code for that. I am using the bleow query: OracleConnection con = new OracleConnection(ConnStr); con.Open(); OracleCommand cmd = new OracleCommand("Stored_Proc",con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(); .................... ................ OracleDataAdapter oda = new OracleDataAdapter (cmd);
Posted: Sep 02, 2010 11:17 AM
View 2 Replies!
View Related
MVC :: LINQ Query Very Slow (only The First Time)?
I'm facing performance problems in my MVC application. The view is displaying a table with 150 rows, the data is collected in the controller. In the controller function, I'm using LINQ to SQL to get the data from tables stored in MS SQL 2005 server.Loading of the view takes far too long, approx. 10 seconds. The same when I reload the page - 10 seconds again. Now the stange thing: [code]... The LINQ call seems to take a long time only the first time I call it inside the controller funtion, a second, third etc. call is much faster.My first guess was that there is something cached, so the second call is much faster. But when I reload the view, the cache seems no longer exist because it takes 10 seconds again.
Posted: Dec 17, 2009 06:45 AM
View 4 Replies!
View Related
SQL Server :: How To Copy Result Query To Another Query
i have tow query in one stored procedure first query and the second one every of them return only value i want to copy the result of tow values in a new row in new table as i want to check on this tow values in ado.net i want to get only this tow values as a row not first and secon query only a row has result of first and second query results [Code]....
Posted: Nov 04, 2010 02:21 PM
View 3 Replies!
View Related
DataSource Controls :: Sql Query With Time Formate
i have one sql query probem i have table with following fields id , event_start_time , event_end_time values is 1 , 10:00:00 AM , 1:15:00 PM 2 , 2:15:00 PM , 5:30:00 PM both event_start_time , event_end_time has datatype is Date/Time now i need to write a query that is lbltime.text="7:43:45" select * from qry_daily_events where event_start_time>= '" & LblTime.text & "' and event_end_time <= '" & LblTime.text & "'" but i m getting data type mismatch error and i try to conver but i m not get it.
Posted: Jun 15, 2010 01:53 AM
View 3 Replies!
View Related
Access :: Select & Update Query At The Same Time?
Currently I run 2 separate queries to update + retrieve a tickent number. What happens if there're 2 users clicking on the same button at the same time? Could somehow two updates being run first and then both users get back the same ticket number? string mySql = "UPDATE TicketCounter SET TicketNumber = (TicketNumber + 1)"; OleDbConnection myConnection = new OleDbConnection(accessConnStr); OleDbCommand myCmd = new OleDbCommand(mySql, myConnection); myCmd.Connection.Open(); myCmd.ExecuteNonQuery(); mySql = "SELECT TicketNumber FROM TicketCounter" myCmd.CommandText = mySql; OleDbDataReader myReader = myCmd.ExecuteReader();
Posted: Nov 29, 2010 09:17 PM
View 4 Replies!
View Related
How To Change C# Trackbar Query
[URL] I have found a custom Track Bar. Now say the "GTrackBar6". Can the value box be set in the middle of the Trackbar? What I notice that the Value Box can only be set in one side. Which code should I change if I want to put it in the middle of the Trackbar?
Posted: Aug 18, 2009, 03:22
View 2 Replies!
View Related
How To Change Page On Time
I have 5 pages and need to have the next page loaded after 20 seconds and so on, and rotate continuously. Ideally I would like to have a sitemap xml and loop through to get the next page, but as I have so few pages (they show different dynamic data) i dont mind hardcoding the page names. Where do i find a timer object?
Posted: Mar 31, 2010 09:52 AM
View 2 Replies!
View Related
Change Single URL Query String Value?
I have an ASP.NET page which takes a number of parameters in the query string: search.aspx?q=123&source=WebSearch This would display the first page of search results. Now within the rendering of that page, I want to display a set of links that allow the user to jump to different pages within the search results. I can do this simply by append &page=1 or &page=2 etc. Where it gets complicated is that I want to preserve the input query string from the original page for every parameter except the one that I'm trying to change. There may be other parameters in the url used by other components and the value I'm trying to replace may or may not already be defined: search.aspx?q=123&source=WebSearch&page=1&Theme=Blue In this case to generate a link to the next page of results, I want to change page=1 to page=2 while leaving the rest of the query string unchanged. Is there a builtin way to do this, or do I need to do all of the string parsing/recombining manually?
Posted: Sep 28 10 at 14:42
View 4 Replies!
View Related
Custom Server Controls :: Change In Nested Property Does Not Change Code?
This might not be a VS-problem, but I think I am using VS wrong!? I am writing a Web Server Control. I Created a property "Title" as label: [Code].... The control is insertet in the ASP.NET page as this: [Code].... When I expand the Title property in VS' property window, and indsert the text value in the text property of the Title property, nothing is shown in the code. I would have expected code to change to somthing like: <cc2:TestControl ID="TestControl1" runat="server" Src="ep.jpg" Title-text="My title" /> If I however manually insert the abowe in the object, it works fine, and it will also be inserted in the text-property of the Title-property in the property window. It just does'nt work the other way around. I can also access the Title property by refering to "TestControl1.Title.text" and it works fine. So - what do I do to be able to insert the text-property (and other properties of the Title-label) via the property window?
Posted: Dec 15, 2009 06:19 AM
View 4 Replies!
View Related
How To Change To Just Display The Date And No Time
I have a report in VS2005 and the field uses the following to display the date: =First(Fields!RequisitionDeliveryDate.Value, "Reports_FieldPOReports") Which works fine, but it displays the date as: "4/30/2009 12:00:00 AM" how can this be changed to just display the date and no time. It's being pulled from a smalldatetime DB field.
Posted: Mar 04, 2009 12:49 PM
View 4 Replies!
View Related
Query - Use A Checkbox To Change The Results Of A SqlDataSource?
I'm using Visual Web Developer 2010 Express. This is my first attempt at creating a .NET page. I have a Gridview on a page that displays the results of a GridQuery. This works. I have a checkbox control(cb_Filter) on the same page that if checked, should add to the where clause of the GridQuery, (where Column5 IS NULL). How do I check the state of the check box so it will run the query with or without the "filter".
Posted: Feb 2 at 21:09
View 2 Replies!
View Related
Query To Change Listbox Selection Mode?
I have an ASP.NET page with a listbox whose selection mode is set to multiple by default. I would like to set its selection mode to single on a button click. Code snippet of my attempt: $('#testBtn').click(function(){ $('#testListBox').attr("SelectionMode","Single"); }); It is not working though. What am I doing wrong here and how to get it to work?
Posted: Mar 1 10 at 18:48
View 1 Replies!
View Related
|