DataSource Controls :: Error - Number Must Be Either Non-negative

Feb 23, 2010

I had a repeater that will be binded using dataset

[Code]....

and on page load I write this code

[Code]....

it worked very well on my machine , after applying it on the server it give the following error

Server Error in '/' Application.

Number must be either non-negative or -1. Parameter name: millisecondsTimeout Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Number must be either non-negative or -1. Parameter name: millisecondsTimeoutSource Error:

[Code]....

Stack Trace:

[Code]....

View 3 Replies


Similar Messages:

Forms Data Controls :: Chage Text Color In Gridview If A Number Is A (-) Negative

Dec 13, 2010

I have a gridview that displays the total hours and employee works. I also have another column in the gridview that shows the difference from the hours worked and 8.5. I want the column that shows the difference to display the number in red whenever the number is a negative.

The gridview looks like:

Time In
Time Out
Hours Worked
Difference
7:30:00 AM
3:58:00 PM
8.47
-0.03

I would like it to look like:

Time In
Time Out
Hours Worked
Difference
7:30:00 AM
3:58:00 PM
8.47
-0.03

View 20 Replies

How To Sum Negative Int Number

Aug 18, 2010

I retrieve data from databse

col1 col2 col3
0 0 1,000
1 0 0
0 1 5
0 -1,200 0
0 0 0
0 0 0

and now I want to sum each for total

[code]....

I will get error when dr["col2"].ToString() = -1,200

col2 += Int32.Parse(dr["col2"].ToString().Replace(",",""),NumberStyles.AllowDecimalPoint);
does the problem is the negative sign?

how to sum for negative number?

View 9 Replies

Web Forms :: Range Validation To Allow Value Between Negative And Positive Number In TextBox

May 7, 2015

I want to put validation in a Textbox, that the numbers entered inside textbox should be between 1 to -1 only i.e., (-1, -0.1, -0.2, -0.3, -0.4, -0.5, -0.6, -0.7 ....... 1 )I tried below code but "RangeValidator" is not working as per requirement:

HTML:

<asp:RangeValidator ID="RangeValidator1" runat="server" MaximumValue="1" MinimumValue="-1" Text="value between 1 to -1" ErrorMessage="value between 1 to -1" ControlToValidate="TxtY" ValidationGroup="usrvalid"></asp:RangeValidator>
<asp:TextBox ID="TxtY" Text='<%#Eval("Y") %>' runat="server" Width="30%"></asp:TextBox>
<cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender5" TargetControlID="TxtY" FilterType="Custom" ValidChars="-01234567890." runat="server"></cc1:FilteredTextBoxExtender>

How to achieve it.

View 1 Replies

DataSource Controls :: Cannot Sort String With Negative Sign On The Left In SQL Server

Jan 21, 2010

I have encountered a problem about "order by" sorting in SQL. As some of the items (strings) in a dropdown list contain negative sign on the left, it is surprising for me that the SQL server cannot sort the items in an alphabetical order and as a result I was forced to set the property value (IsSort = False) of the Ajax ListSearch, which slow down the searching speed a lot. Below are examples of two of the string items with a negative sign on the left.

View 6 Replies

Forms Data Controls :: Error - Index Was Out Of Range - Must Be Non-negative And Less Than The Size Of The Collection

Mar 1, 2011

i am trying to do a really simple thing but it won't work...

[Code]....

this is the error i get

Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index

i can see different columns in gridview but when hidding gives me error

View 1 Replies

DataSource Controls :: Number 1 Working As The Same As Number 2?

Apr 22, 2010

any one know why are the following two give me different result? they should both give me no results as the value I give is not available. however, number 1 give me many results, and number 2 works as expected. I'd like the number 1 working as the same as number 2.

1. DECLARE

@SearchMCat nvarchar,
@SearchTitle nvarchar,
@SearchDesc nvarchar
SET @SearchMCat = 'fjiewo;jafoia'
SET @SearchTitle = 'fryere'
SET @SearchDesc = 'fdsfdsafae33'
SELECT ArticleCategory.CategoryDisplayName, Article.AudioPlaybackTargetTabID, Article.VideoPlaybackTargetTabID, Article.StartTime, Article.DateAdded, Article.Body, Article.Synopsis, Article.Title, Article.ArticleHasAudio, Article.ArticleHasVideo, Article.createdBy,
Article.RatingTotal, Article.RatingCount, Article.ArticleID, ArticleCategory.CategoryName
FROM ArticleCategory RIGHT OUTER JOIN Article ON ArticleCategory.ArticleCategoryID = Article.MasterCategory
WHERE (ArticleCategory.CategoryName LIKE '%' + @SearchMCat + '%') or (Article.Title LIKE '%' + @SearchTitle + '%') or (Article.Body LIKE '%' + @SearchDesc + '%')

2.

SELECT ArticleCategory.CategoryDisplayName, Article.AudioPlaybackTargetTabID, Article.VideoPlaybackTargetTabID, Article.StartTime, Article.DateAdded, Article.Body, Article.Synopsis, Article.Title, Article.ArticleHasAudio, Article.ArticleHasVideo, Article.createdBy, Article.RatingTotal, Article.RatingCount, Article.ArticleID, ArticleCategory.CategoryName
FROM ArticleCategory RIGHT OUTER JOIN Article ON ArticleCategory.ArticleCategoryID = Article.MasterCategory
WHERE (ArticleCategory.CategoryName LIKE '%' + 'fdsafdsafdsa' + '%') or (Article.Title LIKE '%' + 'fffaery' + '%') or (Article.Body LIKE '%' + 'fdas3r43ffdsa' + '%')

View 4 Replies

DataSource Controls :: SSIS Job Failed With Error Error Code: 0x80004005 OLEDB Error

Jun 6, 2010

Error:
Executed as user: MACSTEELUSA.COMsa. ...9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 8:00:17 PM Error: 2010-06-02 20:00:18.56 Code: 0xC0202009 Source: CRM_ORACLE_ARSUMMARY Connection manager "SourceConnectionOLEDB" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80004005 Description: "Oracle client
and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed.". End Error Error: 2010-06-02 20:00:18.58 Code: 0xC020801C Source: Data Flow Task Source - Query [1] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireCon... The package execution fa... The step failed.

Tasks Taken:Went to this folder checked for tnsnames.ora file but it is in good shape.

C:ORACLEproduct11.2.0client_1
etworkadmin

View 2 Replies

DataSource Controls :: Get Max Number Of A Column?

May 17, 2010

could some one help me how can i get max number of a column in sqlserver2005.

actually in my column records are,

1,2,3A,3B,3C LIKE this format.

so how can i get max numer i.e 4 here.

View 21 Replies

DataSource Controls :: How To Get The Serial Number

Jun 7, 2010

How can I get the serial number when you add a new row in the table Add time in order to add the number in the second table

I mean I want in same the sqlcommand to insert and get the value of ( serial )..

View 3 Replies

Forms Data Controls :: GridView DateDiff Negative Value

Apr 8, 2010

I have a GridView that populates the days between the start and end date. What i want to ask is that is it possible to display a word "Overdue" (If possible "Overdue by 7 days") when the datediff is negative (eg: -7 days) The following are parts my codes for now:

<asp:TemplateField HeaderText="Date Raised" SortExpression="DateRaised">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("DateRaised","{0:d}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Expected Close Date" SortExpression="DateClose">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("DateClose","{0:d}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="DaysTaken" HeaderText="Allocated Days" />
<asp:BoundField DataField="RemainingDays" HeaderText="Remaining Days" />
<asp:SqlDataSource ID="SqlDS_UnresolvedIssues" runat="server"
ConnectionString="<%&#36; ConnectionStrings:DatabaseConnectionString_PITLog %>"
SelectCommand="SELECT [IssueLog].[DateRaised], [IssueLog].[DateClose], DATEDIFF(dd,DateRaised,DateClose) AS DaysTaken, DATEDIFF(dd, GETDATE() ,DateClose) AS RemainingDays FROM [IssueLog]
INNER JOIN [ActDetails] ON [IssueLog].[ActID]=[ActDetails].[ActID] WHERE [ActDetails].[ProjID]=@ProjID AND [ActDetails].[DevPhase]=@DevPhase AND NOT [IssueLog].[IssueStatus]=@IssueStatus">
<SelectParameters>
<asp:ControlParameter ControlID="DD_PMProjID" Name="ProjID" />
<asp:ControlParameter ControlID="DD_DevPhase" Name="DevPhase" />
<asp:Parameter DefaultValue="COMP" Name="IssueStatus" />
</SelectParameters>
</asp:SqlDataSource>

By the way, I am using Web Developer 2008, VB.net.

View 11 Replies

Forms Data Controls :: Put Bracket For Negative Numbers?

Aug 6, 2010

I have a gridview that calculate net balance by taking deposit - withdraw. So when the withdraw is more than the deposit, it will result in a negative value, how do I detect that and replace the minus sign with bracket?

[code]....

View 10 Replies

DataSource Controls :: SQL Statemet To Retrieve Particular Row And X Number Of Following Row

Jan 22, 2010

how do you retrieve a particular record in a table plus x number of records that comes after it, assuming it is ordered in a particular way?I want to retrieve 3 records, and I want record where Row_A = 2 to be the first record, and the next 2 more records that follows it, assuming it is ordered by Row_A.

View 2 Replies

DataSource Controls :: Max Number In Column Of Datatable?

Jan 27, 2010

i have a column seq_no in datatable. if the column with data 2,4,5 how can i have the max number of the column. C#

View 5 Replies

DataSource Controls :: Convert Day Of Week Number To Day Name?

Jun 1, 2010

I have seen a lot of posts online about converting the date, or day of week to a number (1-7) representing what day of the week it is.Unfortunately, I have a database that I'm trying to import that is using that number, and I need to convert it to the Day of the week Name. Is there an easy way to do this?

View 4 Replies

DataSource Controls :: Storedprocedure, Where Functie Only If The Number Is Not 0?

May 24, 2010

need a Stored Procedure with a where with 23 where items.But if a item is 0 then i should skip that selection.So i need something like the code below, but sadly that doesnt work... And 23x23=529 selections isn't a option for me.

[Code]....

select * from tblMatchData

View 2 Replies

AJAX :: Error "Invalid Home Number. Number Should Be In The Format: 555-123-4567" With MaskedEditExtender

Oct 28, 2010

My requirement is, I have one text box and that text box accepts US Format 10 digit phone number like 555-555-5555. I want when user enter 5555555555 it automatically convert this in 555-555-5555 and if he enter some wrong number then show him error and if dont want to enter any thing then there should not be any error.

<th style="width: 150px">Home Telephone </th>
<td>
<asp:TextBox ID="txtHome" runat="server" MaxLength="12" ValidationGroup="vUserDetailsB" Width="252px" CssClass="txtBox" TabIndex="19"></asp:TextBox>
<cc1:MaskedEditExtender ID="meeHome" runat="server" TargetControlID="txtHome"
AutoComplete="false" MaskType="None" Mask="999-999-9999" ClearMaskOnLostFocus="true" InputDirection="LeftToRight" />
<%-- <cc1:MaskedEditValidator ID="mevHome" runat="server" ControlToValidate="txtHome"
EmptyValueMessage="Telephone Number is required." ValidationGroup="vUserDetailsB"
ControlExtender="meeHome" InvalidValueMessage="Valid Telephone Number is required."
IsValidEmpty="false" ValidationExpression="^d{3}-d{3}-d{4}&#36;" Font-Size="8pt" />--%>
<asp:RegularExpressionValidator ID="revHome" runat="server" ControlToValidate="txtHome" Display="Dynamic" ErrorMessage="Invalid Home number. Number should be in the format: 555-123-4567" Font-Size="8pt" SetFocusOnError="True" ValidationExpression="d{3}-d{3}-d{4}"
ValidationGroup="vUserDetailsB" Width="100%" meta:resourcekey="txtHomeResource1"></asp:RegularExpressionValidator>
</td>

Whats happenening, If i entered any thing like 5555555555 and it is coverting to this 555-555-5555 format which is correct and then when i moved to another textbox it is throwing error "Invalid Home number. Number should be in the format: 555-123-4567" and this format changes to 5555555555 and its not going ahead.

View 3 Replies

DataSource Controls :: Remove The Number 12 And Remain 11,13 In The Field?

Feb 25, 2010

I have a field that may or may not contain comma.

if the field contain some word and separated by comma

how can i remove specific word in the field.

e.g. the field contain --> 11,12,13

how can i remove the number 12 and remain 11,13 in the field?

View 5 Replies

DataSource Controls :: Retrieve Particular Number Of Records From Table?

Jul 5, 2010

I want to retrieve particular no of records from table with Condition..

my table structure is
QID Question Status
1 ssssss True
2 ssssss True
3 ssssss False
4 ssssss False
5 ssssss False

here i want to 3 questions condition is Status Filed TRUE Questions are must be getting..

View 9 Replies

DataSource Controls :: How To Get The Current Identity Number When Doing Insert

May 20, 2010

The scenario is that I wanna insert a record to the database via INSERT query and I need to user the identity number of this record in the INSERT query.

But I don't know how to achieve this.

Here is my table structure and code for your better understanding.

There are three columns in the Table: categoryID, categoryName, categoryPath. I need the path based on the categoryID which is an identity int column.

Now I used this code to do INSERT:

[Code]....

View 6 Replies

DataSource Controls :: Convert Number To Word In Sql Server?

May 22, 2010

how i canconvert number to word in sql server

like 100.255 = one handerd and 255

like financial bill

View 8 Replies

DataSource Controls :: Inserting Large Number Of Records?

Mar 10, 2010

I want to insert a large amount( approx 7000 records) of data into a table, My scenarios is that i need to check whether the record already exists then it will not insert it. Currently i am using a stored procedure for this which gets called for each record.

IF EXISTS(SELECT 'True' FROM MYTABLE WHERE ID = @ID)
BEGIN

--This means it exists, return it to ASP and tell us

SELECT 'This record already exists!'
END
ELSE
BEGIN

--This means the record isn't in there already, let's go ahead and add it

SELECT 'Record Added'
IF EXISTS(SELECT 'True' FROM [Aadil].[dbo].[SharePointSitesData] WHERE ID <> @ID)

View 11 Replies

DataSource Controls :: How To Count Number Of Rows In Database

Jan 8, 2010

i am using sql 2005 db. i have created a table called attendance where i store employee attendance, i want to separate number of absence for a particular employee and particular month. It have to show number of absence of a particular employee and particular month. Also i have to count no of absence. for eg: if an employee absence for two days for a particular month, it have to display 2 count.. how to do this? also how to write the store procedure for this?

View 4 Replies

DataSource Controls :: SqlDataSource Variable Number Of Parameters

Mar 7, 2011

I should perform a Query like this Select * from produtcts where model like @MODEL Now if model is selected from combobox, it should be Select * from produtcts where model like '%MODEL1%' while, if selected chooise is null, it should be like each element in my combobox. how should i do this (in SqlDataSource)

View 5 Replies

DataSource Controls :: Total Number Of Records In Gridview?

Jul 23, 2010

I am using a gridview with inbuilt paging whose data source is an objectdatasource. i simply need to show the total no of records present in gridview in a label. when i use gridview1.rows.count then it will return only the total no of records present in that page. Is there a way to find out the total number of records present in gridview or in objectdatasource.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved