我可以将列名及其特定数据检索为两个列值。可以从INFORMATION_SCHEMA.COLUMNS获取列名。我们可以获得
数据也与查询相同
设置@tsql ='select'+ @ col +'= Column_name,(从@tablename中选择@col)来自INFORMATION_SCHEMA.COLUMNS,其中Table_name类似'''+ @ tablename +'''
EXEC(@tsql);
或者我们可以在存储过程中放置循环
答案 0 :(得分:1)
public byte[] imageToByteArray(System.Drawing.Image imageIn)
{
MemoryStream ms = new MemoryStream();
imageIn.Save(ms,System.Drawing.Imaging.ImageFormat.Gif);
return ms.ToArray();
}
public Image byteArrayToImage(byte[] byteArrayIn)
{
MemoryStream ms = new MemoryStream(byteArrayIn);
Image returnImage = Image.FromStream(ms);
return returnImage;
}