Need to see your image insertion code. While creating table do you code like:
CREATE TABLE [dbo].[ImgTbl2](
..........
[ImgName] [nvarchar](50) NULL,
[Img] [nvarchar](max) NULL
)
And then before insert your image:
ByteArrayOutputStream stream = new ByteArrayOutputStream();
originBitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
byteArray = stream.toByteArray();
encodedImage = Base64.encodeToString(byteArray, Base64.DEFAULT);
While inserting:
String commands = "Insert into ImgTbl2 (ImgName,Img) values ('"
+ imageName.getText().toString() + "','" + encodedImage
+ "')";
If all of them are correct, you code will work good.
More:
Android Storing Images in MS SQL Server[
^]
How to store/retrieve image to/from SQLServer[
^]