Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. hey..urgent help needed with makin a site like orkut ...

hey..urgent help needed with makin a site like orkut ...

Scheduled Pinned Locked Moved ASP.NET
csharpdatabasehelpsql-serversysadmin
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vishnu_ajit
    wrote on last edited by
    #1

    hey..pls help..i need help..i m having trouble with makin of my project..which is to make a site similiar to orkut... the part i am having trouble is in storing and retrieving images onto my sql server database using c#.net i tried both image format and filepath format... the problem is i am not much familiar with the sql and c# linkage..pls pls do help me out..its urgent..dats y... thanks in advance.... i've got to submit this in around 4to 5 days time..

    S I V C 4 Replies Last reply
    0
    • V vishnu_ajit

      hey..pls help..i need help..i m having trouble with makin of my project..which is to make a site similiar to orkut... the part i am having trouble is in storing and retrieving images onto my sql server database using c#.net i tried both image format and filepath format... the problem is i am not much familiar with the sql and c# linkage..pls pls do help me out..its urgent..dats y... thanks in advance.... i've got to submit this in around 4to 5 days time..

      I Offline
      I Offline
      imranafsari
      wrote on last edited by
      #2

      you can store imagepath in database ... you can upload photo using uplaodfile web control and retrive back using imagemap vontrol..... hope this may clear the picture bit more...

      imaran khan

      1 Reply Last reply
      0
      • V vishnu_ajit

        hey..pls help..i need help..i m having trouble with makin of my project..which is to make a site similiar to orkut... the part i am having trouble is in storing and retrieving images onto my sql server database using c#.net i tried both image format and filepath format... the problem is i am not much familiar with the sql and c# linkage..pls pls do help me out..its urgent..dats y... thanks in advance.... i've got to submit this in around 4to 5 days time..

        S Offline
        S Offline
        Sathesh Sakthivel
        wrote on last edited by
        #3

        Try this

        SSK.

        1 Reply Last reply
        0
        • V vishnu_ajit

          hey..pls help..i need help..i m having trouble with makin of my project..which is to make a site similiar to orkut... the part i am having trouble is in storing and retrieving images onto my sql server database using c#.net i tried both image format and filepath format... the problem is i am not much familiar with the sql and c# linkage..pls pls do help me out..its urgent..dats y... thanks in advance.... i've got to submit this in around 4to 5 days time..

          V Offline
          V Offline
          Vasudevan Deepak Kumar
          wrote on last edited by
          #4

          This article should help you out: http://www.codeproject.com/aspnet/CPImageGallery.asp[^]

          Vasudevan Deepak Kumar Personal Homepage Tech Gossips

          1 Reply Last reply
          0
          • V vishnu_ajit

            hey..pls help..i need help..i m having trouble with makin of my project..which is to make a site similiar to orkut... the part i am having trouble is in storing and retrieving images onto my sql server database using c#.net i tried both image format and filepath format... the problem is i am not much familiar with the sql and c# linkage..pls pls do help me out..its urgent..dats y... thanks in advance.... i've got to submit this in around 4to 5 days time..

            C Offline
            C Offline
            codelinks
            wrote on last edited by
            #5

            you can use this code to insert a image codebehind c# private void getIMGproperites() { HtmlInputFile imageItem = this.FindControl("Img") as HtmlInputFile; Int32 intImageSize; string strImageType; Stream ImageStream; intImageSize = imageItem.PostedFile.ContentLength; strImageType = imageItem.PostedFile.ContentType; ImageStream = imageItem.PostedFile.InputStream; imageInsert(intImageSize, strImageType, ImageStream, intAlbumId, struseridHome); } public static string imageInsert(Int32 intImageSize, string strImageType, Stream ImageStream, Int32 intAlbumId, string struseridHome) { string path = "Database=master;Server=noussrv1010;pwd=sa;uid=sa;"; SqlConnection conn = new SqlConnection(path); string strStatus = MyConstants.StrStatusOne; byte[] ImageContent = new byte[intImageSize]; int intStatus; intStatus = ImageStream.Read(ImageContent, 0, intImageSize); SqlCommand myCommand = new SqlCommand("PNP_Inspic", conn); myCommand.CommandType = CommandType.StoredProcedure; SqlParameter imgEmail = new SqlParameter("@Email_ID", SqlDbType.VarChar, 40); imgEmail.Value = struseridHome; myCommand.Parameters.Add(imgEmail); SqlParameter imgAlbumId = new SqlParameter("@PKAlbum_Id", SqlDbType.VarChar, 40); imgAlbumId.Value = intAlbumId; myCommand.Parameters.Add(imgAlbumId); SqlParameter imgImageact = new SqlParameter("@Image_act", SqlDbType.Image); imgImageact.Value = ImageContent; myCommand.Parameters.Add(imgImageact); SqlParameter imgImageType = new SqlParameter("@Image_Type", SqlDbType.VarChar, 255); imgImageType.Value = strImageType; myCommand.Parameters.Add(imgImageType); SqlParameter imgImageSize = new SqlParameter("@Image_Size", SqlDbType.VarChar, 400); imgImageSize.Value = intImageSize; myCommand.Parameters.Add(imgImageSize); SqlParameter imgImageSubdate = new SqlParameter("@Image_Sub_date", SqlDbType.DateTime); imgImageSubdate.Value = DateTime.Now; myCommand.Parameters.Add(imgImageSubdate); try { conn.Open(); myCommand.ExecuteNonQuery();

            V 1 Reply Last reply
            0
            • C codelinks

              you can use this code to insert a image codebehind c# private void getIMGproperites() { HtmlInputFile imageItem = this.FindControl("Img") as HtmlInputFile; Int32 intImageSize; string strImageType; Stream ImageStream; intImageSize = imageItem.PostedFile.ContentLength; strImageType = imageItem.PostedFile.ContentType; ImageStream = imageItem.PostedFile.InputStream; imageInsert(intImageSize, strImageType, ImageStream, intAlbumId, struseridHome); } public static string imageInsert(Int32 intImageSize, string strImageType, Stream ImageStream, Int32 intAlbumId, string struseridHome) { string path = "Database=master;Server=noussrv1010;pwd=sa;uid=sa;"; SqlConnection conn = new SqlConnection(path); string strStatus = MyConstants.StrStatusOne; byte[] ImageContent = new byte[intImageSize]; int intStatus; intStatus = ImageStream.Read(ImageContent, 0, intImageSize); SqlCommand myCommand = new SqlCommand("PNP_Inspic", conn); myCommand.CommandType = CommandType.StoredProcedure; SqlParameter imgEmail = new SqlParameter("@Email_ID", SqlDbType.VarChar, 40); imgEmail.Value = struseridHome; myCommand.Parameters.Add(imgEmail); SqlParameter imgAlbumId = new SqlParameter("@PKAlbum_Id", SqlDbType.VarChar, 40); imgAlbumId.Value = intAlbumId; myCommand.Parameters.Add(imgAlbumId); SqlParameter imgImageact = new SqlParameter("@Image_act", SqlDbType.Image); imgImageact.Value = ImageContent; myCommand.Parameters.Add(imgImageact); SqlParameter imgImageType = new SqlParameter("@Image_Type", SqlDbType.VarChar, 255); imgImageType.Value = strImageType; myCommand.Parameters.Add(imgImageType); SqlParameter imgImageSize = new SqlParameter("@Image_Size", SqlDbType.VarChar, 400); imgImageSize.Value = intImageSize; myCommand.Parameters.Add(imgImageSize); SqlParameter imgImageSubdate = new SqlParameter("@Image_Sub_date", SqlDbType.DateTime); imgImageSubdate.Value = DateTime.Now; myCommand.Parameters.Add(imgImageSubdate); try { conn.Open(); myCommand.ExecuteNonQuery();

              V Offline
              V Offline
              Vasudevan Deepak Kumar
              wrote on last edited by
              #6

              codelinks wrote:

              INSERT INTO PNP_UPLOAD_FILES

              You could have at least cut down your application-specific table names or comments. :rolleyes:

              Vasudevan Deepak Kumar Personal Homepage Tech Gossips

              C 1 Reply Last reply
              0
              • V Vasudevan Deepak Kumar

                codelinks wrote:

                INSERT INTO PNP_UPLOAD_FILES

                You could have at least cut down your application-specific table names or comments. :rolleyes:

                Vasudevan Deepak Kumar Personal Homepage Tech Gossips

                C Offline
                C Offline
                codelinks
                wrote on last edited by
                #7

                soory dude no time for that,, otherwise would have given a very good code

                winnie

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups