Saturday, November 22, 2014

Exporting CLR Assemblies from SQL Server back to .dll files

Solution 1

Create a sql server project and import the database. It will import all the assemblies in the assemblies folder

How to set the database owner (DBO) has EXTERNAL ACCESS ASSEMBLY permission as TRUE?

EXEC sp_changedbowner 'sa'
ALTER DATABASE [dbase] SET trustworthy ON

asp net c# How do you convert Byte Array to Hexadecimal String, and vice versa?

public byte[] GetStringToBytes(string value)
{
 var shb = System.Runtime.Remoting.Metadata.W3cXsd2001.SoapHexBinary.Parse(value);
 return shb.Value;
}
 
public string GetBytesToString(byte[] value)
{
 var shb = new System.Runtime.Remoting.Metadata.W3cXsd2001.SoapHexBinary(value);
 return shb.ToString();
}