Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 20, 2011 04:04 AM by shafiqkr
Member
454 Points
372 Posts
Nov 30, 2011 12:29 PM|LINK
hi all,
i am using enterprise library5.0.i have Byte[] imgByte variable.i have a field of image data type in my table in sqlserver.
how i can pass this Byte[] in parameter
this is not working
db.AddInParameter(dbCommand, "@img", DbType.Binary, imgByte);
what type i should declare in my store procedure?
Participant
1042 Points
186 Posts
Nov 30, 2011 06:10 PM|LINK
Hi
In Sql Server, use image data type or varbinary data type, to store byte array data.
So use DbType.VarBinary
I hope this will work
Good Luck
regards
Dec 01, 2011 04:29 PM|LINK
Ranjeet:
There is no DbType.VarBinary in enterprise libreary....there are
DbType.Binary or DbType.VarNumeric etc...wat i sould use?
When i change sql field to image or varbinary mac,both working wit DbType.Binary.so wich onw ll be better?
Dec 20, 2011 04:04 AM|LINK
i solved it by googling,thanks all
shafiqkr
Member
454 Points
372 Posts
DbType issue in enterprise library
Nov 30, 2011 12:29 PM|LINK
hi all,
i am using enterprise library5.0.i have Byte[] imgByte variable.i have a field of image data type in my table in sqlserver.
how i can pass this Byte[] in parameter
this is not working
db.AddInParameter(dbCommand, "@img", DbType.Binary, imgByte);
what type i should declare in my store procedure?
RanjeetAulak...
Participant
1042 Points
186 Posts
Re: DbType issue in enterprise library
Nov 30, 2011 06:10 PM|LINK
Hi
In Sql Server, use image data type or varbinary data type, to store byte array data.
So use DbType.VarBinary
I hope this will work
Good Luck
regards
Blog-http://www.aspbits.com
shafiqkr
Member
454 Points
372 Posts
Re: DbType issue in enterprise library
Dec 01, 2011 04:29 PM|LINK
Ranjeet:
There is no DbType.VarBinary in enterprise libreary....there are
DbType.Binary or DbType.VarNumeric etc...wat i sould use?
When i change sql field to image or varbinary mac,both working wit DbType.Binary.so wich onw ll be better?
shafiqkr
Member
454 Points
372 Posts
Re: DbType issue in enterprise library
Dec 20, 2011 04:04 AM|LINK
i solved it by googling,thanks all