What line of code is producing that error?
~~Bonnie
>Thanks Bonnie,
>
>That is where I started.... But when I use that technique I get "invalid substring reference" yahta yahta yahta complaints from ADO.
>
>Invalid length parameter passed to the SUBSTRING function
>
>
>Glenn
>
>>Glenn,
>>
>>I think it's simply a string .NET data type and a VARCHAR() SQL data type. That's the first thing I would try anyway. <g>
>>
>>~~Bonnie
>>
>>
>>
>>>I am trying to store an DES3 encrypted string from a VB.Net program into a field of a SQL 2005 table using a stored procedure.
>>>The final Code which returns the encrypted string is:
>>>CipheredValue = Convert.ToBase64String(desdencrypt.TransformFinalBlock(buff, 0, buff.Length))
>>>Return CipheredValue
>>>
>>>
>>>My questions are:
>>>
>>>What data type is required in SQL 2005 to store this data
>>>What datatype must I use as the parameter in the SP
>>>What data type must I use in the>>>Command.Parameters.AddWithValue()
>>>What datatype should I use in the VB.Net program
>>>
>>>
>>>I sure could use some sage advice.
>>>
>>>Thanks
>>>
>>>Glenn