How can be store image in database by vb.net

6 views
Skip to first unread message

Daya Shankar

unread,
Apr 14, 2008, 7:50:18 AM4/14/08
to DotNetDe...@googlegroups.com
hi dear all of u.
 
Pls tell me how can be insert a image into database and it's fetch from databse .by vb.net and sql server 2000
as well as vb 6.0

Cerebrus

unread,
Apr 14, 2008, 12:31:28 PM4/14/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting

Andrew Badera

unread,
Apr 14, 2008, 12:32:05 PM4/14/08
to DotNetDe...@googlegroups.com

CK

unread,
Apr 14, 2008, 1:27:11 PM4/14/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
create procedure addImage(@image varbinary(max))
AS
set nocount off

insert into imagetable
VALUES (@image)

if @@error > 1 print 'there was an error'

return pi
GO

create procedure getImage()
AS
set nocount off

select from imagetable

print image -- glossy or matte?

if @@error > 1 print 'there was an error' -- definitely matte this
time

return pi
GO

i always return pi so that i know it has succeeded properly and not
thrown an error.



/sarcasm
/wit
/retardation
Reply all
Reply to author
Forward
0 new messages