Click here to Skip to main content
15,881,967 members
Home / Discussions / C#
   

C#

 
Generalcontrol in menu Pin
Mohamad Al Husseiny19-Jan-04 20:27
Mohamad Al Husseiny19-Jan-04 20:27 
GeneralInstaller startmenu question Pin
joepardue19-Jan-04 16:10
joepardue19-Jan-04 16:10 
GeneralRe: Installer startmenu question Pin
Shahin7719-Jan-04 17:46
Shahin7719-Jan-04 17:46 
GeneralRe: Installer startmenu question Pin
Heath Stewart19-Jan-04 20:23
protectorHeath Stewart19-Jan-04 20:23 
GeneralRe: Installer startmenu question Pin
joepardue20-Jan-04 4:23
joepardue20-Jan-04 4:23 
QuestionHow to get the target that *.lnk link to Pin
god4k19-Jan-04 16:07
god4k19-Jan-04 16:07 
GeneralImages, SQL and C# -PLEASE HELP Pin
Peter Greenall19-Jan-04 14:28
Peter Greenall19-Jan-04 14:28 
GeneralRe: Images, SQL and C# -PLEASE HELP Pin
Heath Stewart19-Jan-04 19:53
protectorHeath Stewart19-Jan-04 19:53 
Adding images to a database has been covered numerous times in the past. Please use the Search Comments link above and search for previous solutions, such as these found in a recent thread: http://www.codeproject.com/script/comments/forums.asp?msg=704229&forumid=1649&XtraIDs=1649&searchkw=database+image&sd=10%2F22%2F2003&ed=1%2F20%2F2004#xx704229xx[^].

As far as sending images (either Image orBitmap, a derivative of Image, neither of which are serializable), most implementations use a MemoryStream (or another Stream like FileStream, especially if the images were already saved to disk) to save the images to a buffer (a byte[] array), which is serializable (since Array is serializable).

Either way, once your image gets deserialized on the server, you still have to insert it into the database. Depending on your implementation requirements, you might actually be better off storing the image on the file system and inserting a file reference (like the URL to access it remotely, which you can always use Page.MapPath to get the file system path) into the database. This way, if you want to display the images in a web page, you don't have to extract them first or use a page to dynamically extract and stream them out using a different content-type than a normal page (ex: .aspx file).

For a good example using SQL Server, see C# Photo Album Viewer[^]. If this is for use on a server, I highly recommend that you do not use Access. Use a real RDBMS that implements ACID properties like SQL Server or the MSDE (a connection-limited version of SQL Server). You can find more information about SQL Server at http://www.microsoft.com/sql/default.asp[^] or download the MSDE for free at http://www.microsoft.com/sql/msde/default.asp[^]. This way, you can take part in transaction processing, stored procedures, triggers, and much more with much greater efficiency than a file-based database like MDB files.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: Images, SQL and C# -PLEASE HELP Pin
Peter Greenall20-Jan-04 1:05
Peter Greenall20-Jan-04 1:05 
GeneralRe: Images, SQL and C# -PLEASE HELP Pin
Jose Fco Bonnin20-Jan-04 5:41
Jose Fco Bonnin20-Jan-04 5:41 
General(?) about transfering to C# Pin
Snyp19-Jan-04 14:02
Snyp19-Jan-04 14:02 
GeneralRe: (?) about transfering to C# Pin
Heath Stewart19-Jan-04 19:41
protectorHeath Stewart19-Jan-04 19:41 
GeneralPerformance issues Pin
lpRomang19-Jan-04 10:54
lpRomang19-Jan-04 10:54 
GeneralRe: Performance issues Pin
leppie20-Jan-04 6:26
leppie20-Jan-04 6:26 
GeneralSharing Crystal Reports Documents between .Net and Delphi. Pin
Shahin7719-Jan-04 9:37
Shahin7719-Jan-04 9:37 
Generalmemory problems!! Pin
abc87619-Jan-04 9:30
abc87619-Jan-04 9:30 
GeneralRe: memory problems!! Pin
Heath Stewart19-Jan-04 19:31
protectorHeath Stewart19-Jan-04 19:31 
QuestionConvert a bitmap with 24bpp Pixel Format into 1bppIndexed Pixel format?? Pin
FiDz19-Jan-04 8:41
FiDz19-Jan-04 8:41 
AnswerRe: Convert a bitmap with 24bpp Pixel Format into 1bppIndexed Pixel format?? Pin
Mazdak19-Jan-04 8:52
Mazdak19-Jan-04 8:52 
AnswerRe: Convert a bitmap with 24bpp Pixel Format into 1bppIndexed Pixel format?? Pin
leppie20-Jan-04 6:35
leppie20-Jan-04 6:35 
QuestionSystem.Activator() - Performance issue? Pin
Jonas Follesø19-Jan-04 8:27
Jonas Follesø19-Jan-04 8:27 
AnswerRe: System.Activator() - Performance issue? Pin
Heath Stewart19-Jan-04 9:13
protectorHeath Stewart19-Jan-04 9:13 
GeneralRe: System.Activator() - Performance issue? Pin
Jonas Follesø19-Jan-04 9:54
Jonas Follesø19-Jan-04 9:54 
Generalabout reports Pin
Dimitris Iliopoulos19-Jan-04 6:07
Dimitris Iliopoulos19-Jan-04 6:07 
GeneralRe: about reports Pin
Guillermo Rivero19-Jan-04 6:14
Guillermo Rivero19-Jan-04 6:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.