Showing posts with label environment. Show all posts
Showing posts with label environment. Show all posts

Tuesday, March 27, 2012

@@ERROR in mult thread environment?

Hi all,
I would like know if I can use @.@.ERROR to error in mult thread environment?
For sample:
If this SP is executed by 2 threads in same time, I wiil have correct value
in @.@.ERROR
Thanks
IF EXISTS (SELECT name
FROM sysobjects
WHERE name = N'terminal_ativo_sp'
AND type = 'P')
DROP PROCEDURE terminal_ativo_sp
GO
CREATE PROCEDURE terminal_ativo_sp
@.tid uterminalid,
@.ret INT OUTPUT
WITH ENCRYPTION
AS
BEGIN
-- declare vars
-- ----
--
DECLARE @.ativo BIT
-- init vars (assume SYS ERROR)
-- ----
--
SET @.ret = 101
SET @.ativo = 0
-- do work
-- ----
--
SELECT @.ativo = ativo FROM estabelecimentos_terminais WHERE terminal_id =
@.tid
-- check error
-- ----
--
IF (@.@.ERROR <> 0)
BEGIN
SET @.ret = 1
RETURN
END
-- check @.ativo
-- ----
--
IF (@.ativo = 1)
BEGIN
SET @.ret = 0
RETURN
END
ENDIts specific to the database connection and is not affected by any other
connection.
So, yes your code is fine.
Tony.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"ReTF" <re.tf@.newsgroup.nospam> wrote in message
news:uAcEXet5FHA.1276@.TK2MSFTNGP09.phx.gbl...
> Hi all,
> I would like know if I can use @.@.ERROR to error in mult thread
> environment?
> For sample:
> If this SP is executed by 2 threads in same time, I wiil have correct
> value in @.@.ERROR
> Thanks
>
> IF EXISTS (SELECT name
> FROM sysobjects
> WHERE name = N'terminal_ativo_sp'
> AND type = 'P')
> DROP PROCEDURE terminal_ativo_sp
> GO
> CREATE PROCEDURE terminal_ativo_sp
> @.tid uterminalid,
> @.ret INT OUTPUT
> WITH ENCRYPTION
> AS
> BEGIN
> -- declare vars
> -- ----
--
> DECLARE @.ativo BIT
> -- init vars (assume SYS ERROR)
> -- ----
--
> SET @.ret = 101
> SET @.ativo = 0
> -- do work
> -- ----
--
> SELECT @.ativo = ativo FROM estabelecimentos_terminais WHERE terminal_id =
> @.tid
> -- check error
> -- ----
--
> IF (@.@.ERROR <> 0)
> BEGIN
> SET @.ret = 1
> RETURN
> END
> -- check @.ativo
> -- ----
--
> IF (@.ativo = 1)
> BEGIN
> SET @.ret = 0
> RETURN
> END
> END
>

Monday, March 19, 2012

.sql control string

My development environment includes Visual Web Developer, SQL Server 2005 Express and SQL Server Management Studio Express. I have a .sql control string that creates a database. The control string is in my App_Data folder within my web site. When I use SQL Server Managment Studio Express to run the .sql control string and create the tables etc. it does it in my SQLEXPRESS folder and not in the web.

How do I run the .sql file so it will create the database in my App_Data folder within the web site?

Thanks,

Kyleq

Hi Kyleq,

Please make sure that your SQL Server Management Studio Express has connected to the correct database.

A simple .mdf file cannot be working properly, we must

1. Attach it to a SQL Server instance.
2. Connection the SQL Server Management Studio Express to that instance and to that database.
3. Run the .sql scripts.
4. Detach the database.

Please read the following for more information:

http://msdn2.microsoft.com/en-us/library/ms228037.aspx

HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!

Tuesday, March 6, 2012

.NET 3rd Party Graphical Controls Extension for RS?

Hi Everyone,
Are there third party .NET controls that can be added to the RS Visual
studio environment and that can be used in reprts , where these controls
would extend the graphical library already currently shipped with RS? I am
looking for guages, cones, pyramid type controls where I can drag and drop
into the report and link to the data set fields in order to get more
graphical results.
Thanks.
--
Message posted via http://www.sqlmonster.comNo, this is not possible. Not sure if this will change with Version 2 or
not.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"James Woo via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:55d25826a3cf4727abfaa309f3b80c56@.SQLMonster.com...
> Hi Everyone,
> Are there third party .NET controls that can be added to the RS Visual
> studio environment and that can be used in reprts , where these controls
> would extend the graphical library already currently shipped with RS? I
am
> looking for guages, cones, pyramid type controls where I can drag and drop
> into the report and link to the data set fields in order to get more
> graphical results.
> Thanks.
> --
> Message posted via http://www.sqlmonster.com