P Patrice Feb 20, 2007 #2 Try : http://support.microsoft.com/kb/326502/en-us My personal default preference is to store just a path in the db to have files sotred in the file system... Patrice
Try : http://support.microsoft.com/kb/326502/en-us My personal default preference is to store just a path in the db to have files sotred in the file system... Patrice
A Adamz5 Feb 20, 2007 #3 Hi 1) Ensure the field is an image field in your table in the database In your app 2) declare a byte array 3) read the picture into the byte array see FileStream class as below Dim fs As New FileStream("c:\yourimage.jpg", FileMode.OpenOrCreate, FileAccess.Read) ReDim mydata(fs.Length) fs.Read(mydata, 0, fs.Length) fs.Close() 4) in the datatable set the row to the byte array do the update as normal hope this helps Regards Adam
Hi 1) Ensure the field is an image field in your table in the database In your app 2) declare a byte array 3) read the picture into the byte array see FileStream class as below Dim fs As New FileStream("c:\yourimage.jpg", FileMode.OpenOrCreate, FileAccess.Read) ReDim mydata(fs.Length) fs.Read(mydata, 0, fs.Length) fs.Close() 4) in the datatable set the row to the byte array do the update as normal hope this helps Regards Adam
H Herfried K. Wagner [MVP] Feb 20, 2007 #4 zafar said: hi, how to save an imge in Database, can any body help me for this... Click to expand... How To Read and Write BLOB Data by Using ADO.NET with Visual Basic .NET <URL:http://support.microsoft.com/?scid=kb;EN-US;308042> HOW TO: Read and Write a File to and from a BLOB Column by Using ADO.NET and Visual Basic .NET <URL:http://support.microsoft.com/?scid=kb;EN-US;316887> HOW TO: Read and Write a File to and from a BLOB Column by Using Chunking in ADO.NET and Visual Basic .NET <URL:http://support.microsoft.com/?scid=kb;EN-US;317034> HOW TO: Read and Write BLOB Data by Using ADO.NET Through ASP.NET <URL:http://support.microsoft.com/?scid=kb;EN-US;326502> ..NET Framework Developer's Guide -- Writing BLOB Values to a Database <URL:http://msdn.microsoft.com/library/en-us/cpguide/html/cpconwritingblobvaluestodatabase.asp>
zafar said: hi, how to save an imge in Database, can any body help me for this... Click to expand... How To Read and Write BLOB Data by Using ADO.NET with Visual Basic .NET <URL:http://support.microsoft.com/?scid=kb;EN-US;308042> HOW TO: Read and Write a File to and from a BLOB Column by Using ADO.NET and Visual Basic .NET <URL:http://support.microsoft.com/?scid=kb;EN-US;316887> HOW TO: Read and Write a File to and from a BLOB Column by Using Chunking in ADO.NET and Visual Basic .NET <URL:http://support.microsoft.com/?scid=kb;EN-US;317034> HOW TO: Read and Write BLOB Data by Using ADO.NET Through ASP.NET <URL:http://support.microsoft.com/?scid=kb;EN-US;326502> ..NET Framework Developer's Guide -- Writing BLOB Values to a Database <URL:http://msdn.microsoft.com/library/en-us/cpguide/html/cpconwritingblobvaluestodatabase.asp>
C Cor Ligthert [MVP] Feb 20, 2007 #5 Zafar, Please don't repeat your message. If there is a question than do it, I gave you a sample how to read from adn add to a database and even somethings more. Cor
Zafar, Please don't repeat your message. If there is a question than do it, I gave you a sample how to read from adn add to a database and even somethings more. Cor