Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Varbinary to stored procedures
Message
 
 
À
04/01/2011 04:42:37
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 2005
Application:
Desktop
Divers
Thread ID:
01494563
Message ID:
01494582
Vues:
32
>
>HI ALL, 
>              
>My first question , because i want to do a login table but the varbinary is very difficult to handle...
>warning :Msg 402, Level 16, State 1, Procedure spUpdateTwoField, Line 11
>The data types nvarchar and varbinary are incompatible in the add operator.
>
>My code
>Create procedure [dbo].[spUpdateTwoField](@tablename nvarchar(255), @pKey varchar(20), @valueOne varbinary) 
>as 
>	declare @sql nvarchar(4000)
>	set @sql =  'update ' + @tablename + ' set  password = ''' + @valueOne+ ''' where id = ''' + @pKey + ''''
>	execute sp_executesql @sql
>
>	return
>
>-----------------------------------------------------------------------------------------------------
>
>Question Second, i want to know stored procedure can use array ?
>Because my stored procedure , i want to do a update function from array to stored the field name....
>In this code, i already to do a insert function , but all field name store in @Column_List , how can i use array to call ...
>for example ... @Column_List [0], @Column_List [1] to use 
>
>
>
Borislav answered your first question. Take a look at this quite long but very comprehensive artcile for the second question:

Arrays & Lists in SQL Server
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform