Warning: mssql_query() [function.mssql-query]: message: Incorrect syntax near ';'. (severity 15) in /home/storage/c/0e/6a/nelogica/lib/mssql_handler.class.php on line 128

Warning: mssql_query() [function.mssql-query]: General SQL Server error: Check messages from the SQL Server (severity 15) in /home/storage/c/0e/6a/nelogica/lib/mssql_handler.class.php on line 128

Warning: mssql_query() [function.mssql-query]: message: Must declare the scalar variable "@strURL". (severity 15) in /home/storage/c/0e/6a/nelogica/lib/mssql_handler.class.php on line 128

Warning: mssql_query() [function.mssql-query]: General SQL Server error: Check messages from the SQL Server (severity 15) in /home/storage/c/0e/6a/nelogica/lib/mssql_handler.class.php on line 128

Warning: mssql_query() [function.mssql-query]: message: Must declare the scalar variable "@strURL". (severity 15) in /home/storage/c/0e/6a/nelogica/lib/mssql_handler.class.php on line 128

Warning: mssql_query() [function.mssql-query]: General SQL Server error: Check messages from the SQL Server (severity 15) in /home/storage/c/0e/6a/nelogica/lib/mssql_handler.class.php on line 128

Warning: mssql_query() [function.mssql-query]: message: Must declare the scalar variable "@strPaginaOrigem". (severity 15) in /home/storage/c/0e/6a/nelogica/lib/mssql_handler.class.php on line 128

Warning: mssql_query() [function.mssql-query]: General SQL Server error: Check messages from the SQL Server (severity 15) in /home/storage/c/0e/6a/nelogica/lib/mssql_handler.class.php on line 128

Warning: mssql_query() [function.mssql-query]: message: Must declare the scalar variable "@strPaginaOrigem". (severity 15) in /home/storage/c/0e/6a/nelogica/lib/mssql_handler.class.php on line 128

Warning: mssql_query() [function.mssql-query]: General SQL Server error: Check messages from the SQL Server (severity 15) in /home/storage/c/0e/6a/nelogica/lib/mssql_handler.class.php on line 128

Warning: mssql_query() [function.mssql-query]: message: Must declare the scalar variable "@strPaginaOrigem". (severity 15) in /home/storage/c/0e/6a/nelogica/lib/mssql_handler.class.php on line 128

Warning: mssql_query() [function.mssql-query]: General SQL Server error: Check messages from the SQL Server (severity 15) in /home/storage/c/0e/6a/nelogica/lib/mssql_handler.class.php on line 128

Warning: mssql_query() [function.mssql-query]: message: Must declare the scalar variable "@nVisitanteID". (severity 15) in /home/storage/c/0e/6a/nelogica/lib/mssql_handler.class.php on line 128

Warning: mssql_query() [function.mssql-query]: General SQL Server error: Check messages from the SQL Server (severity 15) in /home/storage/c/0e/6a/nelogica/lib/mssql_handler.class.php on line 128

Warning: mssql_query() [function.mssql-query]: Query failed in /home/storage/c/0e/6a/nelogica/lib/mssql_handler.class.php on line 128
Erro no Banco de Dados:
Query:
DECLARE @strURL AS varchar(255) = 'http://www.nelogica.com.br/artigos/indicadores/ifr.php', @strQueryString AS varchar(255) = '', @strPaginaOrigem AS varchar(255) = '', @strQueryStringOri AS varchar(255) = '', @nVisitanteID AS bigint = ; BEGIN TRY BEGIN TRANSACTION userNavigationTracker DECLARE @nPaginaID AS bigint = 0, @nPaginaID_Origem AS bigint = 0; ----------------------------------------------------- -- Procura pelo registro da página visitada. SELECT @nPaginaID = nPaginaID FROM Site.dbo.Paginas WHERE strURL = @strURL AND strQueryString = @strQueryString ----------------------------------------------------- -- Se não existir a página visitada, cadastra-se. IF(@nPaginaID = 0) BEGIN INSERT INTO Site.dbo.Paginas ( strURL ,strQueryString ,dtRegistro ) VALUES ( @strURL, @strQueryString, GETDATE() ) SET @nPaginaID = SCOPE_IDENTITY(); END; IF(@strPaginaOrigem <> '') BEGIN ------------------------------------------------------ -- Procura pelo registro da página de origem. SELECT @nPaginaID_Origem = nPaginaID FROM Site.dbo.Paginas WHERE strURL = @strPaginaOrigem AND strQueryString = @strQueryStringOri ----------------------------------------------------- -- Se não existir a página de origem, cadastra-se. IF(@nPaginaID_Origem = 0) BEGIN INSERT INTO Site.dbo.Paginas ( strURL ,strQueryString ,dtRegistro ) VALUES ( @strPaginaOrigem, @strQueryStringOri, GETDATE() ) SET @nPaginaID_Origem = SCOPE_IDENTITY(); END; END; -------------------------------------------------- -- Caso a página de origem seja diferente da -- página acessada, registra o caminho. IF(@nPaginaID_Origem <> @nPaginaID) BEGIN INSERT INTO Site.dbo.Caminhos ( nVisitanteID ,dtVisita ,nPaginaID_Origem ,nPaginaID_Acessada ) VALUES ( @nVisitanteID ,GETDATE() ,@nPaginaID_Origem ,@nPaginaID ) END; COMMIT TRANSACTION userNavigationTracker END TRY BEGIN CATCH SELECT ERROR_LINE() AS LINE, ERROR_MESSAGE() AS STRMESSAGE, ERROR_NUMBER() AS NUMBER, ERROR_PROCEDURE() AS STRPROCEDURE, ERROR_SEVERITY() AS SEVERITY, ERROR_STATE() AS STRSTATE; ROLLBACK TRANSACTION userNavigationTracker END CATCH;
Erro:
Must declare the scalar variable "@nVisitanteID".