Showing posts with label fields. Show all posts
Showing posts with label fields. Show all posts

Tuesday, March 20, 2012

BUG: UPDATE updates not listed fields

Hi Everybody,

I am in this forum for a first time. Today, I think, I found a bug in SQL Server 2000. I tried it on SQL Server 2005 and it is alive yet. Before I explain exact the problem I have a stupid question. Is there any type of award if I have found a real bug. It is about a situation when I try to update some fields in a table and I get updated some other wrong fields. There aren't any triggers ot something else. Create a new table, insert one row, update some fields but other ones get changed too. Is there something known about this ?

Thanks, Hristo.

No, there's no award, except for bragging rights :)

Post your code/sprocs, DDL etc. so someone can try to duplicate. If there's no triggers, calculated fields etc., it would be a strange bug indeed.

|||

Mike,

This is a simple example what happens:

************************************************************************

CREATE TABLE [dbo].[BUGTABLE] (
BUG1 varchar(1) NULL,
BUG2 varchar(1) NULL,
BUG3 varchar(1) NULL,
BUG4 varchar(1) NULL,
BUG5 varchar(1) NULL,
BUG6 varchar(1) NULL,
BUG7 varchar(1) NULL,
BUG8 varchar(1) NULL,
BUG9 bit NULL,
BUG10 bit NULL
)
GO

INSERT BUGTABLE (BUG10) VALUES('1')

select BUG10 from BUGTABLE

UPDATE BUGTABLE SET
BUG1 = 'T',
BUG2 = 'T',
BUG3 = 'T',
BUG4 = 'T',
BUG5 = 'T',
BUG6 = 'T',
BUG7 = 'T',
BUG8 = 'T',
BUG9 = '0'

select BUG10 from BUGTABLE

***********************************************************

See how BUG10 field is changed by SQL Server :) :) :)

I think this is because of the "optimized" storege of the BIT fields(by 8 fields in a single byte). And in a combination with some other fields this is the result :) I wrote to Microsoft too :)

Thank you for the comments!

|||So, what should we see? It's 1 appeared both times on 8.0.878 server build. What is your's result and build?|||I tried on both SQL Server 2000 & 2005..Nothing seems to be weird...|||No problem here either. What are you seeing?

You assigned BUG10 = 1 and it is still 1 in both SQL 2000 SP4 (8.00.2040) and SQL 2005 SP1 (9.00.2153.00).|||

I am with Microsoft SQL Server 2000 - 8.00.194

On my version and other ones (without SP) BUG10 changes to 0.

It seem that this is fixed in the Service Packs....thanks!!! :)

|||

If sombody have reproduced the problem let me know :)

Finaly, this is a bug, fixed in the recent versions ?

|||Obviously, it was fixed. That version you are using is the original SQL 2000 released over 3 years ago. The solution is update. There are many many many reasons to be running SP4.|||Yup, Thank you. I was excited if it was an unknown bug :)

Monday, March 19, 2012

BUG Multi-value field in SP2

Hi,
There seems to be a bug with the multi-valed fields when only one value is
selected and that value contains only spaces. I get the message 'Please
select a value for the parameter...'. It works when I test it in Visual
Studio but it doesn't work on the Web. I'm using SQL Server 2005 with SP2.
Any ideas ? Suggestions ?
Regards
AlainOn Apr 6, 12:05 pm, "Alain Magnan" <AMag...@.Hatch.caGARBAGE> wrote:
> Hi,
> There seems to be a bug with the multi-valed fields when only one value is
> selected and that value contains only spaces. I get the message 'Please
> select a value for the parameter...'. It works when I test it in Visual
> Studio but it doesn't work on the Web. I'm using SQL Server 2005 with SP2.
> Any ideas ? Suggestions ?
> Regards
> Alain
Are you using 2 columns in the dataset that sources the multi-select
parameter? If the value field is something like 0, it might not error
out. Something like this might work (in the dataset; where Name is the
displayed item and NameID is the parameter value):
Name NameID
" " 0
"Bob" 1
"John" 2
"Bill" 3
Hope this is helpful.
Regards,
Enrique Martinez
Sr. Software Consultant

Friday, February 24, 2012

Browser Based Report Builder

Hi,
I am looking at building a simple browser based report builder. I would like
to provide options to move fields and add text\captions to exsisting reports
using a browser(IE)
To startwith I am looking at displaying the fields(those are present in
report) in a grid(where the user could change the order of them) and have a
report preview pane(where the user could preview the report.
Could someone please let me know how I could have a preview pane in web page
and how I could make changes to the report as soon as a user changes the
fields order in grid.
Any help\suggestions on this would be greatly appreciated.
Thanks
PonnuIf you have SS2005 then dont reinvent the wheel, it is already there as
Report Model / Report Builder which i browser based.
Amarnath
"Ponnu" wrote:
> Hi,
> I am looking at building a simple browser based report builder. I would like
> to provide options to move fields and add text\captions to exsisting reports
> using a browser(IE)
> To startwith I am looking at displaying the fields(those are present in
> report) in a grid(where the user could change the order of them) and have a
> report preview pane(where the user could preview the report.
> Could someone please let me know how I could have a preview pane in web page
> and how I could make changes to the report as soon as a user changes the
> fields order in grid.
> Any help\suggestions on this would be greatly appreciated.
> Thanks
> Ponnu
>
>|||Hi Amarnath,
I am planning to do in SSRS 2005.
I could use ReportViewer for previewing reports but I need to change the
order of columns in the reoprt once the user changes the order in the grid.
Any ideas how I could programatically change the report from vb.net to
change the order of columns?
Thanks
Ponnu
"Amarnath" <Amarnath@.discussions.microsoft.com> wrote in message
news:8A4339DA-1E37-4959-8B3C-7DED2DDE4272@.microsoft.com...
> If you have SS2005 then dont reinvent the wheel, it is already there as
> Report Model / Report Builder which i browser based.
> Amarnath
> "Ponnu" wrote:
>> Hi,
>> I am looking at building a simple browser based report builder. I would
>> like
>> to provide options to move fields and add text\captions to exsisting
>> reports
>> using a browser(IE)
>> To startwith I am looking at displaying the fields(those are present in
>> report) in a grid(where the user could change the order of them) and have
>> a
>> report preview pane(where the user could preview the report.
>> Could someone please let me know how I could have a preview pane in web
>> page
>> and how I could make changes to the report as soon as a user changes the
>> fields order in grid.
>> Any help\suggestions on this would be greatly appreciated.
>> Thanks
>> Ponnu
>>

Sunday, February 12, 2012

bound table

I am wondering if anyone knows a solution to this question.

I have an sp that may return two different value fields depending on the parameters that are passed in. One way, the sp can return 5 values and another way it can return 10 values. I need to bind the returned values to a table. However, I only want to view the values that are intended to be shown. For example, if the input is SSN and show all is false then the 5 values that need to be outputted would be first name, last name, address, zip code, and contact number. However, if the input is SSN and the show all is true, then the 10 values would be the name plus, other info........

How can I go about outputting all of this info? should I use one bound table?

Or should I have two tables one on top of another and then differentiate on what to show based on what parameters have been inputted? how would i do that and is it possible?

Column headers should reflect all the data that is displayed. Therefore, i was thinking making two tables with hard coded column headers.

Any help would be grateful!

thanks

yadgor2000

I found the answer to my own question, I hope it might help someone else in future: http://www.codeproject.com/dotnet/DynamicReport.asp?df=100&forumid=205933&exp=0&select=1195355

YADGOR2000