View Complete Post
You got to love management, they can never make their minds up on what they want.
I'm currently working on a asp.net project using a datagridview that acts for the most part like a spreadsheet. What I have to do now is update all the values in the table from the selected date, hour, min, max and cost forward. There are 7 days worth of data in the table, when the user alters either the min, max or cost I need all the values in that field from that point onward to have the new altered value.
Here's an example:
In hour 10 of the day the user want to increase the max from 5 to 19, the min stays the same and so does the cost. Mind you any or all of these values could change. The only once that will remain as-is is the Date and Hour field:
The timestamps that you can obtain from Windows NT are limited to a maximum resolution of 10 or 15 milliseconds, depending on the underlying hardware. At times, such as when you need to timetag frequent events, it is desirable to achieve a higher resolution. For example, what if you want to be able to contact a thread or perform some other task at intervals more frequent than 10 milliseconds? Suggested ways of achieving better resolution include using performance counters in conjunction with the sytem time to calculate smaller time increments. But using performance counters is a technique that presents its own problems. This article shows one possible way of overcoming limitations inherent in this approach.
MSDN Magazine March 2004
I want to return random records in term of time whithout NEWID
I have a form that is doing a simple insert, then a sub insert of a certain drop down selection is made. What i dont get is why the main insert is inserting duplicates and the sub works fine inserting 1 record per text as expected. I click the button 1 time, and when i check the table, there are 2 new records.. As you can see the insert is not wrapped with any conditions, once that is inserted i check if a slection was made and runs the sub insert.
My full code can be found in this post(http://forums.asp.net/t/1608619.aspx), but here is what i have for my button event.
protected void btnSaveServConfig_Click(object sender, EventArgs e)
dac.insertServerConfigintosql(txtEmailLogin, txtEmailPass, Convert.ToInt32(ddlNumEmail.SelectedValue));
if (Convert.ToInt32(ddlNumEmail.SelectedValue) > 0)
Dictionary<string, string> camValues = new Dictionary<string, string>();
foreach (HtmlTableRow row in table1.Rows)
foreach (HtmlTableCell cell in row.Cells)
foreach (Control control in cell.Controls)
I have requirement to read the excel data and based on some conditions ih ave either insert/ update the data in to Oracle tables. to check the condition I have to loop through the 4 columns for 4 conditions which may consist of huge number
of records, where performance issue arise here. please put me in the right way or suggest me a best approach to break through the performance issue as well.
ofcourse i am writing in a service.
I need to find rows in a table that have StartTime and EndTime that fall between sent start and end time parameters. Below is the design of the table I want to search and below it is an example of a SELECT statement. I need to add to the SELECT
another condition (e.g. AND StartTime BETWEEN @StartTime AND @EndTime OR EndTime BETWEEN @StartTime AND @EndTime). Any help is appreciated.
CREATE TABLE [dbo].[CareScheduleDetail](
[CareScheduleDetailID] [int] IDENTITY(1,1) NOT NULL,
[CareScheduleID] [int] NOT NULL,
[WorkDay] [tinyint] NOT NULL,
[StartTime] [time](7) NULL,
[EndTime] [time](7) NULL,
[SvcType] [varchar](4) NULL,
[Effective] [date] NULL,
[Ended] [date] NULL)
SELECT WorkDay, StartTime, EndTime
WHERE (Ended IS NULL)
need some help creating a stored proc to update n records based on user choice. so if user decides to enter 3 vouchers i create 3 text boxes and when button click should check if all the vouchers exsits and then update all of them. the problem is that if user enters one wrong voucher and two correct the update takes place for those two and i handle the error based on condition so it confuses as it return and error. here is what i have:
I need to write a select that pulls all of the rows from a data table but the problem is that I need to get the rows three at a time.
I am querying SharePoint data and since SharePoint only allots so many fields per record per data type, my list has three rows for every list item. So in order to sum fields 1-31 of loat data I actually need to grab row instance 0, 1, and 2.
For each list item field float 1-12 holds 1-12 in row instance = 0 and float 1-12 holds 13-24 in row instance = 1 and float 1-7 holds float data for 25-31 in row instance = 2. The field name of the row instance is . I need to sum fields float1-float12
for the three rows and get one total.
Normally I would use something that summed the 12 float fields and assign it to one variable field to be returned in the select. But I have to loop through the three rows to get that for each and then sum the subtotals of the three rows adn repeat
Can anyone give me a pseudo code for the select? I am just not that fancy with SQL I guess.
You can assume that there are always exactly 3 rows for each item whether or not there is data in any of the given fields. If the field has no positive data it is recorded as NULL in the field.
Thank you in advance to any with ideas.