Click here to Skip to main content
15,892,746 members
Home / Discussions / C#
   

C#

 
GeneralRe: STRING MANIPULATION Pin
Jose Fco Bonnin20-Jan-04 5:33
Jose Fco Bonnin20-Jan-04 5:33 
GeneralRe: STRING MANIPULATION Pin
Heath Stewart20-Jan-04 5:42
protectorHeath Stewart20-Jan-04 5:42 
GeneralRe: STRING MANIPULATION Pin
leppie20-Jan-04 6:23
leppie20-Jan-04 6:23 
GeneralRe: STRING MANIPULATION Pin
Jose Fco Bonnin21-Jan-04 4:07
Jose Fco Bonnin21-Jan-04 4:07 
GeneralRe: STRING MANIPULATION Pin
leppie21-Jan-04 6:09
leppie21-Jan-04 6:09 
GeneralRe: STRING MANIPULATION Pin
POKRI21-Jan-04 2:09
POKRI21-Jan-04 2:09 
GeneralOWC components Pin
pankajdaga20-Jan-04 3:13
pankajdaga20-Jan-04 3:13 
GeneralDirectX CaptureBuffer run-time error Pin
Shimi12319-Jan-04 23:42
Shimi12319-Jan-04 23:42 
GeneralRe: DirectX CaptureBuffer run-time error Pin
Shimi12320-Jan-04 3:02
Shimi12320-Jan-04 3:02 
GeneralData type lost when convertingto XML Pin
Yaron K.19-Jan-04 23:23
Yaron K.19-Jan-04 23:23 
GeneralRe: Data type lost when convertingto XML Pin
Heath Stewart20-Jan-04 4:05
protectorHeath Stewart20-Jan-04 4:05 
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 

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.