Groups | Blog | Home
all groups > sql server programming > june 2005 >

sql server programming : Indexed views and table update


Huacuz
6/15/2005 10:06:01 PM
Hi every one!

I have a problem with an indexed view, it points to a table that need to be
updated constantly, the problem is that I can update, insert and delete from
Query Analizer but my ASP can not by calling a stored and it connects by ADO,
not ODBC. When I take off the index from the view it works perfectly. Why
could this be?

Some body help me please!!!!!

Thanks a lot.
Tibor Karaszi
6/16/2005 12:00:00 AM
My guess is that the proper SET settings aren't set from the app. I agree that error messages would
be helpful :-)

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/


[quoted text, click to view]

Uri Dimant
6/16/2005 12:00:00 AM
[quoted text, click to view]

Yep, that is exactly what Andrew has mentioned with the (OP's) previous post



"Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.com> wrote in
message news:%23svUtCkcFHA.132@TK2MSFTNGP10.phx.gbl...
[quoted text, click to view]

Louis Davidson
6/16/2005 12:21:42 AM
It could be that you have an IF statement in your stored procedure that
says:

IF index exists
raiserror

Though I doubt it :) Can you tell us what error you are getting? And does
the procedure work from QA?

--
----------------------------------------------------------------------------
Louis Davidson - http://spaces.msn.com/members/drsql/
SQL Server MVP


[quoted text, click to view]

John Bell
6/16/2005 8:59:07 AM
Hi

Have you seen http://support.microsoft.com/default.aspx?scid=kb;en-us;305333?

John

[quoted text, click to view]
Huacuz
6/16/2005 2:15:03 PM
Hi! I guess are the set settings, cause it doesn´t show any error message,
just don´t do it... Ihave set all the settings right on the DB but how can I
set those on the app??? (like arithabort, etc. is an ADO connection).

Thanks

[quoted text, click to view]
Huacuz
6/16/2005 2:23:01 PM
By the way the SP works right on QA, I´ve already set the settings on the SP
as well but something funny happened. I made a backup of my DB and created a
new one, my test application is an exact copy of the original and is directed
to my test db, i created the views and put my set settings inside the SP code
like this:

set ANSI_NULLS ON
set ANSI_PADDING ON
set ANSI_WARNINGS ON
set ARITHABORT ON
set CONCAT_NULL_YIELDS_NULL ON
set NUMERIC_ROUNDABORT OFF
set QUOTED_IDENTIFIER ON

I also created the views and table with those settings, it worked right and
my test app is working, but when i did the same thing on the original it
didn´t work!!! and both DB are on the same server, the apps are the same the
only difference is the db.

Thanks

[quoted text, click to view]
Louis Davidson
6/16/2005 5:00:52 PM
So it appears to work but doesn't? Can you send the statements you are
executing? That sounds pretty bad. You might want to script out the
statements that are being executed (or profile them) to see exacty what is
being executed.

--
----------------------------------------------------------------------------
Louis Davidson - http://spaces.msn.com/members/drsql/
SQL Server MVP


[quoted text, click to view]

Huacuz
6/16/2005 5:27:03 PM
Thanks a lot u saved my life

-----------------------------------------

[quoted text, click to view]
John Bell
6/16/2005 11:21:05 PM
Hi

Does this mean it works?

From your previous posts it seems that you may need to improve your error
checking/handling so this may be a place to start
http://www.sommarskog.se/error-handling-I.html and
http://www.sommarskog.se/error-handling-II.html

John

[quoted text, click to view]
AddThis Social Bookmark Button