all groups > sql server msde > june 2006 >
You're in the

sql server msde

group:

Stored query occasionally returns only one column


Stored query occasionally returns only one column Customh2
6/20/2006 11:38:02 AM
sql server msde: I have a query, generated by Visual Studio.net in an ASP.net web-app which
normally works fine, but occasionally only returns one column of the selected
row.
the first column (Recd_ID) is the identity/key column, and when the query
fails, only this column is returned, another attempt a moment later works
fine. could this be an optomistic/pessimistic issue? is there a workaround? I
don't want to hold up the web request by waiting some period of time then
Re: Stored query occasionally returns only one column Customh2
6/20/2006 1:50:02 PM
the query COmmandText was built by the Visual Studio IDE :
"SELECT Recd_ID, Game_ID, StartDate, EndDate, Status, Seats, SeatsTaken,
UserOrder, CurUser, NextUser, NextExpires, DraftSeconds, BankSeconds,
PositionOrder, DraftDelay, RealPlay, GameType, Price, Fee, Sport, Scoring
FROM Rooms"

then I append " WHERE (Recd_ID = 234)" (or whatever recd# I'm looking for)

the query works perfectly 99% of the time, and as you said either returns
the full row or an empty datatable, but then I get an occasional error
stating that the column "Sport" doesn't exist. in a 'Catch' I listed the
datacolumns for the table, only one column (Recd_ID) was there, the value was
the correct record#. the next attempt (refresh the page for instance) works
perfectly, and the failure doesn't occur again for hours or days, then it's
identical.

Thanks for your prompt reply too !!!

[quoted text, click to view]
Re: Stored query occasionally returns only one column Andrea Montanari
6/20/2006 9:39:42 PM
hi,
[quoted text, click to view]

it actually seems "nonsense" :|
your code, which you do no show, should return "all or nothing" and not only
part of a result...
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://italy.mvps.org
DbaMgr2k ver 0.19.0 - DbaMgr ver 0.63.0 and further SQL Tools
--------- remove DMO to reply

Re: Stored query occasionally returns only one column Andrea Montanari
6/21/2006 12:00:00 AM
hi,
[quoted text, click to view]

again, this really is an "abnormal" behavior.. never heard about something
like that... the whole select_list should always be retrieved, even in case
of empty sets...
can you reproduce the problem? I do think you should open a case with
Microsoft...
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://italy.mvps.org
DbaMgr2k ver 0.19.0 - DbaMgr ver 0.63.0 and further SQL Tools
--------- remove DMO to reply

AddThis Social Bookmark Button