How can we help you today? How can we help you today?
Olaf Pietsch DETECON

Activity overview

Latest activity by Olaf Pietsch DETECON

Tray application for Query Analyzer
I haven't install the SQL Server 2000 tools because these tools are not needed. We are using SQL Server 2005 tools. Why is the tray application enabling SQL Prompt in Query Analyzer installed in th...
1 follower 1 comment 0 votes
Hello Brian, I am using only SQL Server 2005 not 2000. I'd like explaining more in detail my steps (all codings are in my first posting): 1. I used the Visual Studio 2005 (VS) to develop the c# CRL function: ... [Microsoft.SqlServer.Server.SqlFunction( DataAccess=DataAccessKind.None ,IsDeterministic=true ,IsPrecise=true ,SystemDataAccess=SystemDataAccessKind.None ,Name="fn2_regexIsMatch" ) ] public static SqlBoolean clrs_f_regexIsMatch([SqlFacet(MaxSize = -1)]SqlString expressionToValidate, [SqlFacet(MaxSize = -1)]SqlString regularExpression) { ... There are the definitions of the parameters ([SqlFacet(MaxSize = -1)]SqlString ...) to use the SQL data type nvarchar(max) in the T-SQL interface (UDF). (In this case I am not able to use the default data type mapping between CLR and SQL Server data types of VS.) 2. I used the auto-deploy function of VS. 3. I scripted the T-SQL UDF (fn2_regexIsMatch) with SSMS to check the auto-deployed UDF. ... /****** Object: UserDefinedFunction [dbo].[fn2_regexIsMatch] Script Date: 10/12/2006 14:00:59 ******/ CREATE FUNCTION [dbo].[fn2_regexIsMatch](@expressionToValidate [nvarchar](max), @regularExpression [nvarchar](max)) RETURNS [bit] WITH EXECUTE AS CALLER AS EXTERNAL NAME [DETECON_safe].[UserDefinedFunctions].[clrs_f_regexIsMatch] GO ... The parameters are all of type nvarchar(max) not nvarchar(0)! (I have tested this function with SQL Server, it is running.) 4. Then I used SQL-Compare to transfer the code of the UDF to another SQL Server 2005 and I got the Error message with SQL-Compare: ... [1001] Line 1: Length or precision specification 0 is invalid. ... CREATE FUNCTION [dbo].[fn2_regexIsMatch] (@expressionToValidate [nvarchar] (0), @regularExpression [nvarchar] (0)) ... What do you think? Thanks, Olaf / comments
Hello Brian, I am using only SQL Server 2005 not 2000. I'd like explaining more in detail my steps (all codings are in my first posting): 1. I used the Visual Studio 2005 (VS) to develop the c# CRL...
0 votes
Synchronzation of Assembly/UDF with parameter nvarchar(MAX)
If have a CLR scalar Function / UDF wich I can not synchronize to another database. I got the error: The following error message was returned from the SQL Server: [1001] Line 1: Length or precision...
3 followers 5 comments 0 votes
Snippets, export / import funtionality
Is it possible to export / import the snippets which are defined in SQL Prompt? In our group each of us want to have the same snippets definitions. Thanks, Olaf
2 followers 2 comments 0 votes
SQL Compare: Display Options Comparing Results
I can't find the display options of the comparing results 1. the Object Name (column 2) is right justifed, how can I left justify it. We use a naming convention of objects with is based on left jus...
1 follower 1 comment 0 votes