Image Upload

7 posts, 0 answers
  1. Duncan
    Duncan avatar
    93 posts
    Member since:
    Jul 2012

    Posted 09 Nov 2011 Link to this post

    Does anyone have any information or example code in regards to upload a image using c# to a type:image column in the databases using OpenAccess?

    If there is any example code for this i would greatly appreciate it.

    Thanks,
    Duncan
  2. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 14 Nov 2011 Link to this post

    Hi Duncan,

    In general, the Image data type of MS SQL Server is mapped to a byte[] property in you Domain Class. This array can easily be retrieved by the function ReadFile if you have the file locally. Otherwise, it can be retrieved from the HTTP Request by different file upload controls, including the Uploader control in Rad Controls for ASP.NET AJAX. 

    Unfortunately we don't have a full example for this process, but it's a good idea for a new sample that will definitely be considered after the upcoming release.

    Do not hesitate to contact us if you have other questions.

    Greetings,
    Ivailo
    the Telerik team

    NEW and UPDATED OpenAccess ORM Resources. Check them out!

  3. DevCraft banner
  4. Duncan
    Duncan avatar
    93 posts
    Member since:
    Jul 2012

    Posted 14 Nov 2011 Link to this post

    I'm actually using RadControls for ASP.NET AJAX. I would love to see a working exampe of an upload and displaying of an image out of the DB using OpenAccess. If anyone else has any input on this, i would greatly appreciate it. Otherwise i look forward to the upcoming releases new samples...

    Duncan
  5. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 17 Nov 2011 Link to this post

    Hi Duncan,

    We are going to notify you on this thread if and when such example is included in our SDK library and is available for download.


    Greetings,

    Ivailo
    the Telerik team

    NEW and UPDATED OpenAccess ORM Resources. Check them out!

  6. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 18 Nov 2011 Link to this post

    Hi Duncan,

    Until we include it in some SDK project, you can use the preliminary version of the sample for reference. Please find it attached, I hope it helps.


    Kind regards,
    Ivailo
    the Telerik team

    NEW and UPDATED OpenAccess ORM Resources. Check them out!

  7. Duncan
    Duncan avatar
    93 posts
    Member since:
    Jul 2012

    Posted 18 Nov 2011 Link to this post

    Thanks Ivailo, i'll take a look at this sample. Much appreciate your time on this! Thank you!
  8. Erik
    Erik avatar
    314 posts
    Member since:
    Feb 2008

    Posted 14 Apr 2012 Link to this post

    Thanks Ivailo & Duncan,

    This was what I was looking for.

    Took me a while though, some search tags: OpenAccess, ORM, Save Picture, database, SQL Server

    Erik
Back to Top
DevCraft banner