Sunday, March 25, 2012
ASP...
retain the value in the corresponding area (text, radio button, texarea, dro
p
down menu)in the first page when i press the back button on the second page.
--
regards seowhuaYou've posted to the wrong newsgroup - this is for SQL Server, not ASP
programming. I'd try posting your question to one of the
microsoft.public.dotnet.framework.aspnet.* newsgroups. (Ditto for your
"ASP Calendar..." post too.)
*mike hodgson*
blog: http://sqlnerd.blogspot.com
seowhua wrote:
>Let say I pass values from first page to second page using a form, how can
I
>retain the value in the corresponding area (text, radio button, texarea, dr
op
>down menu)in the first page when i press the back button on the second page
.
>sql
Thursday, March 8, 2012
AS2005 Cube Excel 2007 Filtering Issue
Hello Mosha. It would be interesting to know about the features in Excel 2007 that are disabled before SSAS2005 SP2?
Is this something that you have mentioned in your Blog(multiselect) or something else?
Do you mean internal features like the MDX being generated from Excel2007?
Are these new features being enabled by an update on the client?
Kind Regards
Thomas Ivarsson
|||> It would be interesting to know about the features in Excel 2007 that are disabled before SSAS2005 SP2?
I agree that it would be interesting to know. This question belongs to the Excel forum, however. Also, in couple of months when everybody has upgraded to SP2, this will become a moot point.
> Are these new features being enabled by an update on the client?
I beleive it's enough to upgrade AS server only.
|||From what you are saying I think the new features will be in an Office 2007 SP1, not in SSAS2005 SP2, even if SSAS2005 will provide the basis for that.
Writeback in Excel 2007 will be on my whish list.
I think we have a problem of where to post Excel 2007 and ProClarity questions regarding SSAS2005.
Regards
Thomas Ivarsson
|||For Excel 2007 questions, the following forum seems to be appropriate: http://forums.microsoft.com/technet/showforum.aspx?forumid=544&siteid=17
Friday, February 24, 2012
Arrays in a Stored Procedure
Can any one help me with a sample code, which can take an array of
elements as one of it's parameters and get the value inserted into a table in a
stored procedure.
Thanks in advance
vnswathi.
SQL dosen't support array, so how do you want to passing an 'array' of elements as parameters to a stored procedure? Maybe you can use a string that delimits the elements of an array by some character(s) and then split the string into a set of values that can be inserted into a table. If so, the key point is how to split the string with specific delimitor, and you can take a look at this post:
http://forums.asp.net/thread/1300724.aspx
Array of Value
WHERE SomeColumn IN (SELECT SomeColumn From SomeTable)
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de|||
Search the forums for "split function". You can then pass values into a stored procedure with a varchar like "2,34,67,98" and have that string split into a set that can be used in an IN clause. These split functions basically break the string up and puts the CSVs into a temporary table and then (similar to the above suggestion) selects the values from the table.
|||But what about doing a select that has results stored in a (single-column) RecordSet? I've not tried it, but can't that RecordSet be passed around as a parameter, and then fed "as is" into an "IN" clause? Is that not a common/popular thing to do? If not, why not?|||>>Is that not a common/popular thing to do?<<
Funny way to put this. Common? Yes. Popular? Yes. Natively supported in SQL Server? Nope.
The "classic" paper on the subject is here: http://www.sommarskog.se/arrays-in-sql.html
You can do it with a table variable, but sadly, you cannot pass this around as a parameter.
Sunday, February 19, 2012
Array / Table As return Type
I have a scenario in which my stored procedure has to return few
variables with their value and also the collection. Now in SQL their is
no such as array, so the best is to return the table in place of.
I am execting the stored procedure by having sql command in place.
and created the various parameters(variables) those i need the values
of and secondly wondering how should i be creating the parameter as a
table returntype.
Any help on this would be a million worth useful.
I can excerpt the code if required.
Regards
Sandesh KadamSandesh (sandesh27uk@.gmail.com) writes:
Quote:
Originally Posted by
I have a scenario in which my stored procedure has to return few
variables with their value and also the collection. Now in SQL their is
no such as array, so the best is to return the table in place of.
>
I am execting the stored procedure by having sql command in place.
and created the various parameters(variables) those i need the values
of and secondly wondering how should i be creating the parameter as a
table returntype.
You cannot pass table variables as parameters.
I have an article on my web site that discusses a couple of ways to
skin the cat: http://www.sommarskog.se/share_data.html.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
Aritmetic Overflor on READING a date value
However, when my repeater is trying to display the records in that table, I get the following error:
"Arithmetic overflow error converting expression to data type datetime."
Here is the stack trace:
[SqlException: Arithmetic overflow error converting expression to data type datetime.]
System.Data.SqlClient.SqlDataReader.Read() +157
System.Data.Common.DbEnumerator.MoveNext() +44
System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +504
System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +48
System.Web.UI.WebControls.Repeater.DataBind() +23
Now, none if this is in my own code, and so it is difficult to put any decent error-trapping. This is all in the built-in ASP.NET Repeater and SqlDataReader classes.
Why on Earth would there be an arithmetic overflow here? Note that the original table this is coming from has the date stored in the SqlDbType.DateTime format! In other words, why is there any conversion needed?
Perhaps it is converting the data from SqlDbType to DbType, but even then, what is so difficult about dealing with the year 2204? According to BOL, the DateTime data type should support up to the year 9999!
Note that when I access the table through Enterprise Manager and change the date, the error disappears. I tried a number of over-and-under tests, and I get this error on any date after 3/19/2151!
Does ASP.NET not support dates after that? I doubt it, but does anyone have an explanation for this?
Thanks,
JKalmost sounds like internally it's storing it as an unsigned integer (like milliseconds since a certain time), although I agree this seems buggy. this could be SQL Server data provider specific. are you sure you aren't using a smalldatetime, that's only valid up to 2079. don't think SQL Server would even let you enter 2204 in a smalldatetime column though.
wonder if this explains it (from BOL)
Values with the datetime data type are stored internally by Microsoft SQL Server as two 4-byte integers. The first 4 bytes store the number of days before or after the base date, January 1, 1900. The base date is the system reference date. Values for datetime earlier than January 1, 1753, are not permitted. The other 4 bytes store the time of day represented as the number of milliseconds after midnight.
just thinking out loud...
cs|||Thanks,
I had originally thought that the smalldatetime might have been part of it when I first got this overflow error a few weeks ago.
What I did was change all of my table columns from smalldatetime to datetime, just to be on the safe side.
The problem seemed to disappear at that time, but then came back today, when I was able to test it a bit more thoroughly.
The real oddity is that SQL Server itself permits the value in the database. It reads, writes and displays the date fine with no error.
But when the SqlDataReader class pulls the next record in the data set containing that information, it runs into this arithmetic overflow.
Any other ideas?
JK
Aritmectic Operator in Formula?
Hi all,
this formula doesn't work as calculated column but WHY?
Column [MAIN]: VARCHAR(150)
VALUE : 'blabla - zobzob'
SUBSTRING([MAIN],1,CHARINDEX('-',[MAIN])) WORKS and return 'blabla -'
BUT
SUBSTRING([MAIN],1,CHARINDEX('-',[MAIN])-2) DOESN'T WORK in a Formula BUT well in a select clause...
Any Idea?
Thanks
In what way does it 'not work'...?
It seems to work ok... (SQL Server 2000)
create table #x (main varchar(20) not null)
insert #x select 'blabla - zobzob'
alter table #x add b as SUBSTRING(MAIN,1,CHARINDEX('-',MAIN)-2)
select * from #x
drop table #x
main b
-- --
blabla - zobzob blabla
/Kenneth
|||Yes indeed, it works with a sql script but NOT manually in SQL Server 2000... Very Strange...
Tks a lot
|||Hmm.. what do you mean by 'manually'..?
In my mind T-SQL code in QA is as 'manual' as you can get..?
/Kenneth
|||With the editor provided in SQL Server 2000...|||You mean Enterprise Manager?
I'd suggest as a solution that you don't use it for other purposes than viewing.
For one thing it doesn't allow you any transactional control when you perform write operations, and some things it does in an awkward way, which adds up to that it takes unnecessary long time and/or large amount of resources to complete.
Make the wrong choice in EM and chances increase that you're looking for the latest good backup, instead of just typing ROLLBACK in QA, when something unexpected happened with the latest change. This ability is due to the fact that you can start your scripts with BEGIN TRAN (don't forget it) before actually performing the change. This is something that EM doesn't give you. =:o/
EM is imo not a fitting tool for database change management. (perhaps with the exception of user and roles management)
Do all your (data/schema) changes in Query Analyzer by controlled scripts instead.
/Kenneth
Thursday, February 16, 2012
Arithmetic overflow error when executing Stored Procedure
Arithmetic overflow error converting expression to data type int.
The 'usp_TicketCreate' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.
Any help would be appreciated, at the moment I am just catching the exception in my code and ignoring it, but I would like to get rid of the exception all together.
Thanks for the help.
SBProgrammerchange the data type of that column to bigint which is presently integer..
integer data type can only stored data upto 32k and if the value exceeds this limit then the sql server's error is generated..
i hope this will solve you problem
Mukund Tambe|||Check the source code of your stored procedure. You are probably returning a variable that is NULL, in other words, something like:CREATE PROCEDURE myProcedure
AS
DECLARE @.badVariable INT -- Declare, but leave NULL
RETURN @.badVariable-PatP|||The code for the Stored Procedure is as follows:
ALTER PROCEDURE dbo.usp_TicketCreate
(
@.IsActive bit = true,
@.TicketStatusId int = 0,
@.TicketTypeId int = 0,
@.TicketTypeGroupId int = 0,
@.TicketPriorityId int = 0,
@.LocationId int = 0,
@.BuildingId int = 0,
@.RoomId int = 0,
@.RoomOther nvarchar(100) = '',
@.AssetFound bit = false,
@.AssetId int = 0,
@.SerialNumber nvarchar(50) = '',
@.InventoryTag nvarchar(20) = '',
@.AssetTagNumber nvarchar(10) = '',
@.ManufacturerId int = 0,
@.Model nvarchar(50) = '',
@.AssignedToUserId int = 0,
@.EndUserId int = 0,
@.EndUser_Name nvarchar(50) = '',
@.EndUser_Email nvarchar(50) = '',
@.EndUser_Phone nvarchar(50) = '',
@.EnteredByUserId int = 0,
@.EnteredTimeStamp datetime,
--@.ProblemDescription nvarchar(2000) = '',
@.TicketId bigint = 0 OUTPUT
)
AS
/* SET NOCOUNT ON */
EXEC @.TicketId = ufx_TicketNewId @.EnteredTimeStamp
-- Update Table TicketId with the NextId
UPDATE
TicketId
SET
NextId = NextId + 1
INSERT INTO Tickets
(
TicketId,
IsActive,
TicketStatusId,
TicketTypeId,
TicketTypeGroupId,
TicketPriorityId,
LocationId,
BuildingId,
RoomId,
RoomOther,
AssetFound,
AssetId,
SerialNumber,
InventoryTag,
AssetTagNumber,
ManufacturerId,
Model,
EndUserId,
EndUserName,
EndUserEmail,
EndUserPhone,
EnteredByUserId,
EnteredTimeStamp
--ProblemDescription
)
VALUES
(
@.TicketId,
@.IsActive,
@.TicketStatusId,
@.TicketTypeId,
@.TicketTypeGroupId,
@.TicketPriorityId,
@.LocationId,
@.BuildingId,
@.RoomId,
@.RoomOther,
@.AssetFound,
@.AssetId,
@.SerialNumber,
@.InventoryTag,
@.AssetTagNumber,
@.ManufacturerId,
@.Model,
@.EndUserId,
@.EndUser_Name,
@.EndUser_Email,
@.EndUser_Phone,
@.EnteredByUserId,
@.EnteredTimeStamp
--@.ProblemDescription,
)
RETURN @.TicketId
--------------
The Function is as follows:
ALTER FUNCTION dbo.ufx_TicketNewId
(
@.DateNow DateTime
)
RETURNS bigint
AS
BEGIN
Declare @.TicketId nvarchar(5)
Declare @.Month nvarchar(2)
Declare @.Day nvarchar(2)
Declare @.Year nvarchar(4)
Declare @.ReturnValue bigint
SELECT @.Year = DatePart(Year, @.Datenow)
SELECT @.Month = DatePart(Month, @.Datenow)
SELECT @.Day = DatePart(Day, @.Datenow)
IF LEN(@.Month) = 1
SELECT @.Month = '0' + @.Month
IF LEN(@.Day) = 1
SELECT @.Day = '0' + @.Day
SELECT @.TicketId = [NextId] FROM TicketId
SELECT @.ReturnValue = @.Year + @.Month + @.Day + @.TicketId
RETURN @.ReturnValue
END
-------------
The Output after executing the Stored Procedure is as follows:
Running [dbo].[usp_TicketCreate] ( @.IsActive = True, @.TicketStatusId = 0, @.TicketTypeId = 1, @.TicketTypeGroupId = 1, @.TicketPriorityId = 1, @.LocationId = 111, @.BuildingId = 111, @.RoomId = 111, @.RoomOther = , @.AssetFound = False, @.AssetId = 0, @.SerialNumber = , @.InventoryTag = , @.AssetTagNumber = , @.ManufacturerId = 1, @.Model = , @.AssignedToUserId = 0, @.EndUserId = 131, @.EndUser_Name = Test User, @.EndUser_Email = Test.User@.TestEmail.com, @.EndUser_Phone = x, @.EnteredByUserId = 131, @.EnteredTimeStamp = 3/14/2007, @.TicketId = 0 ).
Arithmetic overflow error converting expression to data type int.
The 'usp_TicketCreate' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead.
(2 row(s) affected)
(0 row(s) returned)
@.TicketId = 20070314107
@.RETURN_VALUE = 0
Finished running [dbo].[usp_TicketCreate].
Thanks again for all your help.
SBProgrammer|||SubProgrammer,
It's like Pat Said
Oh, and you should never use RETURN with a value...SQL Server can overwrite it..use an output variable|||Brett,
Thanks for your reply. How should you return a value than, I am just doing as my manager had done before me. I would appreciate a sample of how to correctly implement this.
SBProgrammer|||Pat,
I have posted code and not sure where my variable is null, since I initiate all of the parameters. If you could help point out what I am missing, or whether or not I am doing this correctly. I would appreciate it.
Thanks so much for your time and information.
SBProgrammer|||The return value from a stored procedure must be an INT value, and 20070314107 is too big to be an INT. This will raise the overflow error, and return a NULL value to the caller.
As Brett pointed out, the @.ticketID OUTPUT variable in your procedure certainly can be used by the calling code. You just can't use the INT return value from the procedure like you can use BIGINT one from the function.
Note that playing character conversion games (like you do for the values in the function) will hurt you at some point in the future. Guaranteed, no question in my mind. It isn't a question of if, but only a question of when it will hurt you.
-PatP
Arithmetic overflow error for data type smallint, value = 46080
at the enterprise manager I can't see the databases, a message error
"Arithmetic overflow error for data type smallint, value = 46080" appears,
but the server is seems to be still working, what it is?
Regards,
Jess R.
Hi
You may want to run SQL profiler to see what is being run by Enterprise
manager.
It could be similar (but not necessarily the same thing as!) to
http://support.microsoft.com/default...b;en-us;234028
Also check the version of SQL Server http://www.aspfaq.com/show.asp?id=2160.
John
"Jesus Brito" wrote:
> Hello friends, in this moments I have a problem with my Ms Sql server 2000,
> at the enterprise manager I can't see the databases, a message error
> "Arithmetic overflow error for data type smallint, value = 46080" appears,
> but the server is seems to be still working, what it is?
> Regards,
> Jesús R.
>
>
Arithmetic overflow error for data type smallint, value = 46080
at the enterprise manager I can't see the databases, a message error
"Arithmetic overflow error for data type smallint, value = 46080" appears,
but the server is seems to be still working, what it is?
Regards,
Jess R.Hi
You may want to run SQL profiler to see what is being run by Enterprise
manager.
It could be similar (but not necessarily the same thing as!) to
http://support.microsoft.com/defaul...kb;en-us;234028
Also check the version of SQL Server http://www.aspfaq.com/show.asp?id=2160.
John
"Jesus Brito" wrote:
> Hello friends, in this moments I have a problem with my Ms Sql server 2000
,
> at the enterprise manager I can't see the databases, a message error
> "Arithmetic overflow error for data type smallint, value = 46080" appears,
> but the server is seems to be still working, what it is?
> Regards,
> Jesús R.
>
>
Arithmetic overflow error for data type smallint, value = 46080
at the enterprise manager I can't see the databases, a message error
"Arithmetic overflow error for data type smallint, value = 46080" appears,
but the server is seems to be still working, what it is?
Regards,
Jesús R.Hi
You may want to run SQL profiler to see what is being run by Enterprise
manager.
It could be similar (but not necessarily the same thing as!) to
http://support.microsoft.com/default.aspx?scid=kb;en-us;234028
Also check the version of SQL Server http://www.aspfaq.com/show.asp?id=2160.
John
"Jesus Brito" wrote:
> Hello friends, in this moments I have a problem with my Ms Sql server 2000,
> at the enterprise manager I can't see the databases, a message error
> "Arithmetic overflow error for data type smallint, value = 46080" appears,
> but the server is seems to be still working, what it is?
> Regards,
> Jesús R.
>
>
Arithmetic overflow error - sql2k
When I open the table from sqlem and update a field, it give me the error
says,
Arithmetic overflow error for data type tinyint, value = -1.
The statement has been terminated.
Any idaes?
ThamksI would suspect data corruption and run DBCC CHECKDB. OR possibly this error is generated from a
trigger so you want to check if there are any triggers on the table. The first thing you want to do,
though is to see if you get the same error from an UPDATE statement; so we can rule out possible
problems in EM.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"mecn" <mecn2002@.yahoo.com> wrote in message news:%238xdNyInHHA.4772@.TK2MSFTNGP05.phx.gbl...
> Hi,
> When I open the table from sqlem and update a field, it give me the error says,
> Arithmetic overflow error for data type tinyint, value = -1.
> The statement has been terminated.
> Any idaes?
> Thamks
>|||How about the limitation of a tinyint that it be between 1 and 255' Check
BOL for datatype ranges.
--
TheSQLGuru
President
Indicium Resources, Inc.
"mecn" <mecn2002@.yahoo.com> wrote in message
news:%238xdNyInHHA.4772@.TK2MSFTNGP05.phx.gbl...
> Hi,
> When I open the table from sqlem and update a field, it give me the error
> says,
> Arithmetic overflow error for data type tinyint, value = -1.
> The statement has been terminated.
> Any idaes?
> Thamks
>|||I wasn't even considering that mecn might be trying to input a negative value.
Mecn, if that is the case then you can ignore my post.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"TheSQLGuru" <kgboles@.earthlink.net> wrote in message news:udmkA3JnHHA.4516@.TK2MSFTNGP05.phx.gbl...
> How about the limitation of a tinyint that it be between 1 and 255' Check BOL for datatype
> ranges.
> --
> TheSQLGuru
> President
> Indicium Resources, Inc.
> "mecn" <mecn2002@.yahoo.com> wrote in message news:%238xdNyInHHA.4772@.TK2MSFTNGP05.phx.gbl...
>> Hi,
>> When I open the table from sqlem and update a field, it give me the error says,
>> Arithmetic overflow error for data type tinyint, value = -1.
>> The statement has been terminated.
>> Any idaes?
>> Thamks
>>
>|||TheSQLGuru,
I know you meant between 0 and 255.
AMB
"TheSQLGuru" wrote:
> How about the limitation of a tinyint that it be between 1 and 255' Check
> BOL for datatype ranges.
> --
> TheSQLGuru
> President
> Indicium Resources, Inc.
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:%238xdNyInHHA.4772@.TK2MSFTNGP05.phx.gbl...
> > Hi,
> > When I open the table from sqlem and update a field, it give me the error
> > says,
> >
> > Arithmetic overflow error for data type tinyint, value = -1.
> > The statement has been terminated.
> >
> > Any idaes?
> >
> > Thamks
> >
> >
>
>
Arithmetic overflow error - sql2k
When I open the table from sqlem and update a field, it give me the error
says,
Arithmetic overflow error for data type tinyint, value = -1.
The statement has been terminated.
Any idaes?
Thamks
I would suspect data corruption and run DBCC CHECKDB. OR possibly this error is generated from a
trigger so you want to check if there are any triggers on the table. The first thing you want to do,
though is to see if you get the same error from an UPDATE statement; so we can rule out possible
problems in EM.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"mecn" <mecn2002@.yahoo.com> wrote in message news:%238xdNyInHHA.4772@.TK2MSFTNGP05.phx.gbl...
> Hi,
> When I open the table from sqlem and update a field, it give me the error says,
> Arithmetic overflow error for data type tinyint, value = -1.
> The statement has been terminated.
> Any idaes?
> Thamks
>
|||How about the limitation of a tinyint that it be between 1 and 255? Check
BOL for datatype ranges.
TheSQLGuru
President
Indicium Resources, Inc.
"mecn" <mecn2002@.yahoo.com> wrote in message
news:%238xdNyInHHA.4772@.TK2MSFTNGP05.phx.gbl...
> Hi,
> When I open the table from sqlem and update a field, it give me the error
> says,
> Arithmetic overflow error for data type tinyint, value = -1.
> The statement has been terminated.
> Any idaes?
> Thamks
>
|||I wasn't even considering that mecn might be trying to input a negative value.
Mecn, if that is the case then you can ignore my post.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"TheSQLGuru" <kgboles@.earthlink.net> wrote in message news:udmkA3JnHHA.4516@.TK2MSFTNGP05.phx.gbl...
> How about the limitation of a tinyint that it be between 1 and 255? Check BOL for datatype
> ranges.
> --
> TheSQLGuru
> President
> Indicium Resources, Inc.
> "mecn" <mecn2002@.yahoo.com> wrote in message news:%238xdNyInHHA.4772@.TK2MSFTNGP05.phx.gbl...
>
|||TheSQLGuru,
I know you meant between 0 and 255.
AMB
"TheSQLGuru" wrote:
> How about the limitation of a tinyint that it be between 1 and 255? Check
> BOL for datatype ranges.
> --
> TheSQLGuru
> President
> Indicium Resources, Inc.
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:%238xdNyInHHA.4772@.TK2MSFTNGP05.phx.gbl...
>
>
Arithmetic overflow error - sql2k
When I open the table from sqlem and update a field, it give me the error
says,
Arithmetic overflow error for data type tinyint, value = -1.
The statement has been terminated.
Any idaes?
ThamksI would suspect data corruption and run DBCC CHECKDB. OR possibly this error
is generated from a
trigger so you want to check if there are any triggers on the table. The fir
st thing you want to do,
though is to see if you get the same error from an UPDATE statement; so we c
an rule out possible
problems in EM.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"mecn" <mecn2002@.yahoo.com> wrote in message news:%238xdNyInHHA.4772@.TK2MSFTNGP05.phx.gbl...
> Hi,
> When I open the table from sqlem and update a field, it give me the error
says,
> Arithmetic overflow error for data type tinyint, value = -1.
> The statement has been terminated.
> Any idaes?
> Thamks
>|||How about the limitation of a tinyint that it be between 1 and 255' Check
BOL for datatype ranges.
TheSQLGuru
President
Indicium Resources, Inc.
"mecn" <mecn2002@.yahoo.com> wrote in message
news:%238xdNyInHHA.4772@.TK2MSFTNGP05.phx.gbl...
> Hi,
> When I open the table from sqlem and update a field, it give me the error
> says,
> Arithmetic overflow error for data type tinyint, value = -1.
> The statement has been terminated.
> Any idaes?
> Thamks
>|||I wasn't even considering that mecn might be trying to input a negative valu
e.
Mecn, if that is the case then you can ignore my post.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"TheSQLGuru" <kgboles@.earthlink.net> wrote in message news:udmkA3JnHHA.4516@.TK2MSFTNGP05.phx
.gbl...
> How about the limitation of a tinyint that it be between 1 and 255' Chec
k BOL for datatype
> ranges.
> --
> TheSQLGuru
> President
> Indicium Resources, Inc.
> "mecn" <mecn2002@.yahoo.com> wrote in message news:%238xdNyInHHA.4772@.TK2MS
FTNGP05.phx.gbl...
>|||TheSQLGuru,
I know you meant between 0 and 255.
AMB
"TheSQLGuru" wrote:
> How about the limitation of a tinyint that it be between 1 and 255' Chec
k
> BOL for datatype ranges.
> --
> TheSQLGuru
> President
> Indicium Resources, Inc.
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:%238xdNyInHHA.4772@.TK2MSFTNGP05.phx.gbl...
>
>
Monday, February 13, 2012
Arithmetic Overflow converting date error with UK dates but not with US dates.
My problem is that I have a DateTo dataset that receives a DateFrom
parameter. The default value of the DateFrom param is taken from a
DateDefault parameter value.
However, when I run the DateTo dataset, entering 27/03/2007, I get an
arithmetic overflow conversion error. If I enter US date 03/27/2007,
it works.
I am not sure why this happens because the dates use ISO (112) or ANSI
(102) formatting - I have tried with both of these.
I think it's to do with the conversion of dates, but I have not been
able to get a working version that does not use US dates.
DateFrom:
with cte as (
select distinct convert(varchar, starttime, 112) as DateFrom
from dbo.sysdtslog90 with (nolock)
)
select
convert(datetime, DateFrom) as DateValue
,DateFrom as DateLabel
from
cte
order by
1 desc
DateDefault:
with cte as (
select max(starttime) as DateDefault
from dbo.sysdtslog90 with (nolock)
)
select
convert(datetime, convert(varchar, DateDefault, 112)) as DateValue
from
cte
DateTo:
with cte as (
select distinct convert(varchar, starttime, 112) as DateTo
from dbo.sysdtslog90 with (nolock)
where starttime >= @.DateFrom -- replace with '27/03/2007' fails --
replace with '03/27/2007' succeeds
)
select
convert(datetime, DateTo) as DateValue
,DateTo as DateLabel
from
cte
order by
1 desc
I have attached a really simple RDL file that shows the problem. To
use it, simply change the datasource to any DB that has the standard
SSIS sysdtslog90 table in. This is automatically generated on the DB
when you turn on logging in SSIS to log to sql server.
Thanks in advance for any help!
RDL FILE
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/
2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/
SQLServer/reporting/reportdesigner">
<DataSources>
<DataSource Name="MyLoggingDB">
<DataSourceReference>MyLoggingDB</DataSourceReference>
<rd:DataSourceID>518ad1ee-288c-4957-a44d-408e39de2244</
rd:DataSourceID>
</DataSource>
</DataSources>
<BottomMargin>2.5cm</BottomMargin>
<RightMargin>2.5cm</RightMargin>
<PageWidth>21cm</PageWidth>
<ReportParameters>
<ReportParameter Name="DateFrom">
<DataType>String</DataType>
<DefaultValue>
<DataSetReference>
<DataSetName>DateDefault</DataSetName>
<ValueField>DateValue</ValueField>
</DataSetReference>
</DefaultValue>
<Prompt>Date From</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>DateFrom</DataSetName>
<ValueField>DateValue</ValueField>
<LabelField>DateLabel</LabelField>
</DataSetReference>
</ValidValues>
</ReportParameter>
</ReportParameters>
<rd:DrawGrid>true</rd:DrawGrid>
<InteractiveWidth>21cm</InteractiveWidth>
<rd:GridSpacing>0.25cm</rd:GridSpacing>
<rd:SnapToGrid>true</rd:SnapToGrid>
<Body>
<ColumnSpacing>1cm</ColumnSpacing>
<Height>5cm</Height>
</Body>
<rd:ReportID>fabcf51f-0565-4b9b-8a68-693ee7ea7e39</rd:ReportID>
<LeftMargin>2.5cm</LeftMargin>
<DataSets>
<DataSet Name="DateFrom">
<Query>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
<CommandText>with cte as (
select distinct convert(varchar, starttime, 112) as DateFrom
from dbo.sysdtslog90 with (nolock)
)
select
convert(datetime, DateFrom) as DateValue
,DateFrom as DateLabel
from
cte
order by
1 desc</CommandText>
<DataSourceName>MyLoggingDB</DataSourceName>
</Query>
<Fields>
<Field Name="DateValue">
<rd:TypeName>System.DateTime</rd:TypeName>
<DataField>DateValue</DataField>
</Field>
<Field Name="DateLabel">
<rd:TypeName>System.String</rd:TypeName>
<DataField>DateLabel</DataField>
</Field>
</Fields>
</DataSet>
<DataSet Name="DateDefault">
<Query>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
<CommandText>with cte as (
select max(starttime) as DateDefault
from dbo.sysdtslog90 with (nolock)
)
select
convert(datetime, convert(varchar, DateDefault, 112)) as DateValue
from
cte</CommandText>
<DataSourceName>MyLoggingDB</DataSourceName>
</Query>
<Fields>
<Field Name="DateValue">
<rd:TypeName>System.DateTime</rd:TypeName>
<DataField>DateValue</DataField>
</Field>
</Fields>
</DataSet>
<DataSet Name="DateTo">
<Query>
<rd:UseGenericDesigner>true</rd:UseGenericDesigner>
<CommandText>with cte as (
select distinct convert(varchar, starttime, 112) as DateTo
from dbo.sysdtslog90 with (nolock)
where starttime >= @.DateFrom
)
select
convert(datetime, DateTo) as DateValue
,DateTo as DateLabel
from
cte
order by
1 desc</CommandText>
<QueryParameters>
<QueryParameter Name="@.DateFrom">
<Value>=Parameters!DateFrom.Value</Value>
</QueryParameter>
</QueryParameters>
<DataSourceName>MyLoggingDB</DataSourceName>
</Query>
<Fields>
<Field Name="DateValue">
<rd:TypeName>System.DateTime</rd:TypeName>
<DataField>DateValue</DataField>
</Field>
<Field Name="DateLabel">
<rd:TypeName>System.String</rd:TypeName>
<DataField>DateLabel</DataField>
</Field>
</Fields>
</DataSet>
</DataSets>
<Width>16cm</Width>
<InteractiveHeight>29.7cm</InteractiveHeight>
<Language>en-US</Language>
<TopMargin>2.5cm</TopMargin>
<PageHeight>29.7cm</PageHeight>
</Report>To answer my own question and save others wasting time.
I have solved this issue now, by converting all the dates to use ISO
standard 20070327 format and pass this around to the parameters
instead of the full date.
Thanks
On 27 Mar, 17:54, "weelin" <wee...@.gmail.com> wrote:
> Hi there,
> My problem is that I have a DateTo dataset that receives a DateFrom
> parameter. The default value of the DateFrom param is taken from a
> DateDefault parameter value.
> However, when I run the DateTo dataset, entering 27/03/2007, I get an
> arithmetic overflow conversion error. If I enter US date 03/27/2007,
> it works.
> I am not sure why this happens because the dates use ISO (112) or ANSI
> (102) formatting - I have tried with both of these.
> I think it's to do with the conversion of dates, but I have not been
> able to get a working version that does not use US dates.
> DateFrom:
> with cte as (
> select distinct convert(varchar, starttime, 112) as DateFrom
> from dbo.sysdtslog90 with (nolock)
> )
> select
> convert(datetime, DateFrom) as DateValue
> ,DateFrom as DateLabel
> from
> cte
> order by
> 1 desc
> DateDefault:
> with cte as (
> select max(starttime) as DateDefault
> from dbo.sysdtslog90 with (nolock)
> )
> select
> convert(datetime, convert(varchar, DateDefault, 112)) as DateValue
> from
> cte
> DateTo:
> with cte as (
> select distinct convert(varchar, starttime, 112) as DateTo
> from dbo.sysdtslog90 with (nolock)
> where starttime >= @.DateFrom -- replace with '27/03/2007' fails --
> replace with '03/27/2007' succeeds
> )
> select
> convert(datetime, DateTo) as DateValue
> ,DateTo as DateLabel
> from
> cte
> order by
> 1 desc
> I have attached a really simple RDL file that shows the problem. To
> use it, simply change the datasource to any DB that has the standard
> SSIS sysdtslog90 table in. This is automatically generated on the DB
> when you turn on logging in SSIS to log to sql server.
> Thanks in advance for any help!
> RDL FILE
> <?xml version="1.0" encoding="utf-8"?>
> <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/
> 2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/
> SQLServer/reporting/reportdesigner">
> <DataSources>
> <DataSource Name="MyLoggingDB">
> <DataSourceReference>MyLoggingDB</DataSourceReference>
> <rd:DataSourceID>518ad1ee-288c-4957-a44d-408e39de2244</
> rd:DataSourceID>
> </DataSource>
> </DataSources>
> <BottomMargin>2.5cm</BottomMargin>
> <RightMargin>2.5cm</RightMargin>
> <PageWidth>21cm</PageWidth>
> <ReportParameters>
> <ReportParameter Name="DateFrom">
> <DataType>String</DataType>
> <DefaultValue>
> <DataSetReference>
> <DataSetName>DateDefault</DataSetName>
> <ValueField>DateValue</ValueField>
> </DataSetReference>
> </DefaultValue>
> <Prompt>Date From</Prompt>
> <ValidValues>
> <DataSetReference>
> <DataSetName>DateFrom</DataSetName>
> <ValueField>DateValue</ValueField>
> <LabelField>DateLabel</LabelField>
> </DataSetReference>
> </ValidValues>
> </ReportParameter>
> </ReportParameters>
> <rd:DrawGrid>true</rd:DrawGrid>
> <InteractiveWidth>21cm</InteractiveWidth>
> <rd:GridSpacing>0.25cm</rd:GridSpacing>
> <rd:SnapToGrid>true</rd:SnapToGrid>
> <Body>
> <ColumnSpacing>1cm</ColumnSpacing>
> <Height>5cm</Height>
> </Body>
> <rd:ReportID>fabcf51f-0565-4b9b-8a68-693ee7ea7e39</rd:ReportID>
> <LeftMargin>2.5cm</LeftMargin>
> <DataSets>
> <DataSet Name="DateFrom">
> <Query>
> <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
> <CommandText>with cte as (
> select distinct convert(varchar, starttime, 112) as DateFrom
> from dbo.sysdtslog90 with (nolock)
> )
> select
> convert(datetime, DateFrom) as DateValue
> ,DateFrom as DateLabel
> from
> cte
> order by
> 1 desc</CommandText>
> <DataSourceName>MyLoggingDB</DataSourceName>
> </Query>
> <Fields>
> <Field Name="DateValue">
> <rd:TypeName>System.DateTime</rd:TypeName>
> <DataField>DateValue</DataField>
> </Field>
> <Field Name="DateLabel">
> <rd:TypeName>System.String</rd:TypeName>
> <DataField>DateLabel</DataField>
> </Field>
> </Fields>
> </DataSet>
> <DataSet Name="DateDefault">
> <Query>
> <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
> <CommandText>with cte as (
> select max(starttime) as DateDefault
> from dbo.sysdtslog90 with (nolock)
> )
> select
> convert(datetime, convert(varchar, DateDefault, 112)) as DateValue
> from
> cte</CommandText>
> <DataSourceName>MyLoggingDB</DataSourceName>
> </Query>
> <Fields>
> <Field Name="DateValue">
> <rd:TypeName>System.DateTime</rd:TypeName>
> <DataField>DateValue</DataField>
> </Field>
> </Fields>
> </DataSet>
> <DataSet Name="DateTo">
> <Query>
> <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
> <CommandText>with cte as (
> select distinct convert(varchar, starttime, 112) as DateTo
> from dbo.sysdtslog90 with (nolock)
> where starttime >= @.DateFrom
> )
> select
> convert(datetime, DateTo) as DateValue
> ,DateTo as DateLabel
> from
> cte
> order by
> 1 desc</CommandText>
> <QueryParameters>
> <QueryParameter Name="@.DateFrom">
> <Value>=Parameters!DateFrom.Value</Value>
> </QueryParameter>
> </QueryParameters>
> <DataSourceName>MyLoggingDB</DataSourceName>
> </Query>
> <Fields>
> <Field Name="DateValue">
> <rd:TypeName>System.DateTime</rd:TypeName>
> <DataField>DateValue</DataField>
> </Field>
> <Field Name="DateLabel">
> <rd:TypeName>System.String</rd:TypeName>
> <DataField>DateLabel</DataField>
> </Field>
> </Fields>
> </DataSet>
> </DataSets>
> <Width>16cm</Width>
> <InteractiveHeight>29.7cm</InteractiveHeight>
> <Language>en-US</Language>
> <TopMargin>2.5cm</TopMargin>
> <PageHeight>29.7cm</PageHeight>
> </Report>
Argument not specified for parameter error
What is the proper method for populating a variable from a cookie and using that value as part of a SQL Select...Where function?
After I get a value out of the Select...Where function, I need to use the dataset results in a DropDownList as well as perform the DataBind().
here's some of the code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
if Not Page.IsPostBack then
dim Code as String
Code = Server.HtmlEncode(Request.Cookies("UCodeCookie")("Code"))
label1.Text = Code
GetPropertyCodes(Code)
ddlPropertyCode.DataBind()
end if
End SubFunction GetPropertyCodes(ByVal Code As String) As System.Data.DataSet
Dim connectionString As String = "server='(local)'; trusted_connection=true; database='master'"
Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)Dim queryString As String = "SELECT [Property_Details_db].[Prop_Code] FROM [Property_Details_db] WHERE ([Property_Details_db].[Code] = @.Code)"
Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnectionDim dbParam_code As System.Data.IDataParameter = New System.Data.SqlClient.SqlParameter
dbParam_code.ParameterName = "@.Code"
dbParam_code.Value = Code
dbParam_code.DbType = System.Data.DbType.String
dbCommand.Parameters.Add(dbParam_code)Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.SqlClient.SqlDataAdapter
dataAdapter.SelectCommand = dbCommand
Dim dataSet As System.Data.DataSet = New System.Data.DataSet
dataAdapter.Fill(dataSet)Return dataSet
End Function
Thanks for your help.
ChrisWhat is the value of your Code variable when you are setting the parameter value? Can you debug that and determine that?
Alsternately, are you certain everything is spelled correctly? Can you look at the actual SQL being sent using SQL Profiler?|||I know the value in the Cookie exists because I can look at the cookie and see the values that were written to it during the login page. I have tried pulling the value out of the cookie and placing it in the Text property of a label but the label isn't changing from it's default value. That tells me two things: 1. The Request.Cookie code syntax is not correct or 2. The syntax is correct but the Request.Cookie is not finding the cookie. Since the Request.Cookie command doesn't report an error if the cookie is empty or not there, how can I check that the syntax is correct.
Everything is spelled correctly as far as I can tell. How do I look at the actual SQL being sent using SQL Profiler? If you mean using the query tool to check that my Select statement is correct, I have done that as part of the Wizard when creating the Function.
Chris|||Here is your problem:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
if Not Page.IsPostBack then
dim Code as String
Code = Server.HtmlEncode(Request.Cookies("UCodeCookie")("Code"))
label1.Text = Code
GetPropertyCodes(Code)
ddlPropertyCode.DataBind()
end if
End Sub
Code is a variable local to your Page_Load. YOu then use Code in your GetPropertyCodes() method without declaring it. Place Option Explicit On at the top of ALL code files and this sort of error will not occur.
You need to either make Code a variable at the page level, or retrieve a local copy in GetPropertyCodes().|||Where do I place Option Explicit On in my source code?|||At the top of the code file:
Option Explicit On
or at the top of a page with code, make sure Explicit="True", like so:
<%@. Page Explicit="True"%>|||Douglas,
I made the addition of the Explicit reference as suggested but now I am getting a different error. Can you tell me what this really means?
<ERROR>
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 8: if Not Page.IsPostBack then
Line 9: dim Code as String
Line 10: Code = Server.HtmlEncode(Request.Cookies("UCodeCookie")("Code"))
Line 11: GetPropertyCodes(Code)
Line 12:
</ERROR
I think the error above was because I wasn't logged in and the Cookie had not been created but that is just a guess. If I login to my site and create the cookie, I get this error:
<ERROR
Exception Details: System.Web.HttpException: DataBinder.Eval: 'System.Char' does not contain a property with the name Prop_Code.
Source Error:
Line 15: ddlPropertyCode.DataValueField = "Prop_Code"
Line 16: ddlPropertyCode.DataMember = "Table"
Line 17: ddlPropertyCode.DataBind()
Line 18: end if
Line 19: End Sub
</ERROR
Thanks for your help.
Chris|||For the first area, obviously you need to protect against the cookie being Nothing.
For the second, Are you certain that the dataset has Prop_Code as a field? Have you checked by examining the DataSet in the debugger?|||Douglas,
I have added an Is Nothing condition so I can redirect to the login page if the Cookie doesn't exist. I know the code to get the Code value out of the Cookie works because I can create a simple page that runs the same commands to populate the UserCode variable and then populate a label.
The Prop_Code column exists in the database table but I still cannot get the Property Code drop down list to populate. I have scoured the Internet and all of my ASP.Net books (including your book) and I still cannot find any references that will help me. My page comes up with the code below but the drop down list is still blank. I have tried populating the properties in the drop down list instead of doing it in the Code but that doesn't work either. I have also tried using a SQLDataSourceControl but then I can't use my function because the dscontrol parameter for the @.Code isn't set.
Do you have any idea or an Internet resource that can help me?
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
if Not Page.IsPostBack then
if Request.Cookies("UCodeCookie") is Nothing then
Response.Redirect("login.aspx")
else
dim UserCode as String
UserCode = Server.HtmlEncode(Request.Cookies("UCodeCookie")("Code"))
GetPropertyCodes(UserCode)
ddlPropertyCode.DataSource = "GetPropertyCodes"
ddlPropertyCode.DataTextField = "Prop_Code"
ddlPropertyCode.DataValueField = "Prop_Code"
ddlPropertyCode.DataMember = "Table"
ddlPropertyCode.DataBind()
end if
end if
End SubFunction GetPropertyCodes(ByVal UserCode As String) As System.Data.DataSet
Dim connectionString As String = "server='(local)'; trusted_connection=true; database='master'"
Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)Dim queryString As String = "SELECT [Property_Details_db].[Prop_Code] FROM [Property_Details_db] WHERE ([Property_Details_db].[Code] = @.Code)"
Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnectionDim dbParam_code As System.Data.IDataParameter = New System.Data.SqlClient.SqlParameter
dbParam_code.ParameterName = "@.Code"
dbParam_code.Value = UserCode
dbParam_code.DbType = System.Data.DbType.String
dbCommand.Parameters.Add(dbParam_code)Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.SqlClient.SqlDataAdapter
dataAdapter.SelectCommand = dbCommand
Dim dataSet As System.Data.DataSet = New System.Data.DataSet
dataAdapter.Fill(dataSet)Return dataSet
End Function
Thanks
Chris|||This:
GetPropertyCodes(UserCode)
ddlPropertyCode.DataSource = "GetPropertyCodes"
should be this:
|||Douglas,
Dim ds as DataSet
ds=GetPropertyCodes(UserCode)
ddlPropertyCode.DataSource = ds.Tables[0]
I get this error:
<ERROR
Compiler Error Message: BC30203: Identifier expected.
Source Error:
Line 15: Dim ds as DataSet
Line 16: ds=GetPropertyCodes(UserCode)
Line 17: ddlPropertyCode.DataSource = ds.Tables[0]
Line 18: ddlPropertyCode.DataTextField = "Prop_Code"
Line 19: ddlPropertyCode.DataValueField = "Prop_Code"
</ERROR>|||Doh! Too many languages. This:
ddlPropertyCode.DataSource = ds.Tables[0]
must be this:
ddlPropertyCode.DataSource = ds.Tables(0)
Parens rather than square brackets...|||Douglas,
That worked. I really appreciate your help.
Could you also help me with one other thing? Now that I have the dropdownlist working, I want to retrieve some information out of another SQL Server table after I submit all of the information for this page based on the same code value that I can then place into another cookie. I am not sure how to get the data out of the dataset (read that as function) and place it into a String variable which can in turn be written to the cookie. Do you have any idea how to do this or at least point me to a resource on the web that can help.
Thanks
Chris|||Given a dataset ds that you have filled as previous examples:
Dim c as string
c=ds.Tables(0).Rows(0)("FieldName")
Area Chart - urgent Help
Percentile, Median value, 75th Percentile and the Customer data.
Now that with SP1, we can specify FILL color, it has become very useful on
this Area chart. (mind you this is Simple Area chart).
However, in certain cases where the customer data completely falls above say
25th Percentile, the whole FILL area of 25th Percentile is overlapped with
the Customer data (and overtaken by Customer FIll color)
SO, I used for customer data, the background color as <Transparent>.
It works absolutely perfect (and as per the color I specify and the border)
in the LAYOUT window, but unfortunately, in the Preview Window it just messes
up..! (and so does when I actually deploy this chart on the Report Server)
I do not understand, why is the display in <Preview Window> any different
from the <Layout window> '
Pls. guide.Please read my responses on your other thread.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Kam" <Kam@.discussions.microsoft.com> wrote in message
news:64445861-60E1-407D-839F-7BA0F16BDCD4@.microsoft.com...
> I have an Area Chart with four different values plotted on it, as 25th
> Percentile, Median value, 75th Percentile and the Customer data.
> Now that with SP1, we can specify FILL color, it has become very useful on
> this Area chart. (mind you this is Simple Area chart).
> However, in certain cases where the customer data completely falls above
say
> 25th Percentile, the whole FILL area of 25th Percentile is overlapped with
> the Customer data (and overtaken by Customer FIll color)
> SO, I used for customer data, the background color as <Transparent>.
> It works absolutely perfect (and as per the color I specify and the
border)
> in the LAYOUT window, but unfortunately, in the Preview Window it just
messes
> up..! (and so does when I actually deploy this chart on the Report Server)
> I do not understand, why is the display in <Preview Window> any different
> from the <Layout window> '
> Pls. guide.
Area Chart - Is there a bug?
Percentile, Median value, 75th Percentile and the Customer data.
Now that with SP1, we can specify FILL color, it has become very useful on
this Area chart. (mind you this is Simple Area chart).
However, in certain cases where the customer data completely falls above say
25th Percentile, the whole FILL area of 25th Percentile is overlapped with
the Customer data (and overtaken by Customer FIll color)
SO, I used for customer data, the background color as <Transparent>.
While chossing color and borders etc, the image that is brought up in the
<Layout> window matches with what selection I've made. However, in the
<Preview> window, the Chart takes GREEN fill-color (mind you, I've chosen
Transaparent color) and thus washes away the area for 25th Percentile
(considering the situation wher the customer data values fall above the 25th
Percentile)
jfyi: The palette I've chosen in this case is <Default> However, I've
already tried with all supported palettes..! They all result into some FILL
color for my customer data.
I do not understand, why is the display in <Preview Window> any different
from the <Layout window> '
The other strategy I've tried is, to plot Customer data as a solid black
line, but seems that feature is not supported (<Plot data as a line>), as
well.
Pls. guide.Several comments:
* "why is the display in <Preview Window> any different from the <Layout
window>"?
The layout window will not execute your queries to retrieve the datasets. It
will use random data to give you an approximation of how the chart will look
at runtime. In addition in layout mode expressions cannot be executed (e.g.
the expression result might depend on the dataset).
* Black line:
You need to use an expression (i.e. ="Black") in this particular case. Due
to a bug, the report designer does not write a constant chart color of Black
into the RDL-file.
* Combining area charts with line charts by using a "Transparent" fill
color:
Based on the RDL specification, Transparent is not a valid color. Therefore
you cannot use Transparent right now for the color property. Please try this
for now:
Color: e.g. White
Gradient: TopBottom
EndColor: ="Transparent"
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Kam" <Kam@.discussions.microsoft.com> wrote in message
news:A8AF6608-E6B1-4B44-851E-3F43E0FBCD62@.microsoft.com...
> I have an Area Chart with four different values plotted on it, as 25th
> Percentile, Median value, 75th Percentile and the Customer data.
> Now that with SP1, we can specify FILL color, it has become very useful on
> this Area chart. (mind you this is Simple Area chart).
> However, in certain cases where the customer data completely falls above
say
> 25th Percentile, the whole FILL area of 25th Percentile is overlapped with
> the Customer data (and overtaken by Customer FIll color)
> SO, I used for customer data, the background color as <Transparent>.
> While chossing color and borders etc, the image that is brought up in the
> <Layout> window matches with what selection I've made. However, in the
> <Preview> window, the Chart takes GREEN fill-color (mind you, I've chosen
> Transaparent color) and thus washes away the area for 25th Percentile
> (considering the situation wher the customer data values fall above the
25th
> Percentile)
> jfyi: The palette I've chosen in this case is <Default> However, I've
> already tried with all supported palettes..! They all result into some
FILL
> color for my customer data.
> I do not understand, why is the display in <Preview Window> any different
> from the <Layout window> '
> The other strategy I've tried is, to plot Customer data as a solid black
> line, but seems that feature is not supported (<Plot data as a line>), as
> well.
> Pls. guide.
>
Thursday, February 9, 2012
Are text pages deleted when a column is converted to varchar
design view of a table within Enterprise Manager the
varchar value (less than 8000 characters) appears in the
column but does SQL Server automatically delete the text
values from their pages?
If not are they removed by routine reindex/defrag or
should I create a new table, import from the text as
varchar and drop the old table to make sure the pages
storing the original text version of the values are
deleted?
..morriszone@.hotmail.com (Steve Morris) wrote in message news:<757b6d8f.0404080820.7956cf62@.posting.google.com>...
> When I change a column from text to varchar using the
> design view of a table within Enterprise Manager the
> varchar value (less than 8000 characters) appears in the
> column but does SQL Server automatically delete the text
> values from their pages?
> If not are they removed by routine reindex/defrag or
> should I create a new table, import from the text as
> varchar and drop the old table to make sure the pages
> storing the original text version of the values are
> deleted?
> .
just try:
select * into your_table_bak from your_table
and then try your alter table statment with no risk of dataloss!
alter table *your_table_bak* :-)
if you dont like to read 8000 charakter to find out wether some data
is loss or not try the function
"getsize"
hth