April 13, 2010 at 3:42 am
Hai to all;
I need to insert the binary images in sqlserver 2005 the images are stored in local harddisk;
the tbl name like studentphotos;
How to insert the data throw by sqlquery pls any one go help me;
Thanks;
Faijurrahuman.A
April 13, 2010 at 5:07 am
what have you tried so far? because this is your first post and your example has the word "student" in it, we want to make sure you learn the concepts, rather than get us to show you how to do a homework assignment.
you would learn nothing and hurt yourself when you are asked/quizzed on the subject again.
I'll give you a hint, and real world advice:
the hint is this is possible from TSQL, one image at a time, using a technique involving OPENROWSET; you can run into problems security wwise if the images are not on the SQL server's local harddrives.
if you really need to do this to a lot of images, TSQL is the wrong tool; you can do all the images in a directory with a programming language much easier; a connection, a streamobject and you could upload them all much more efficiently in say .NET.
Lowell
April 13, 2010 at 6:52 am
Although you mention SQL Server 2005, since you're posting this in the SQL Server 2008 forum, you might want to consider looking at using the FileStream data type and then you can store the file on the file system where it belongs and simply maintain a pointer to it but with an integrity check in the database.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply