hey..urgent help needed with makin a site like orkut ...
-
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..
-
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..
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
-
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..
SSK.
-
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..
This article should help you out: http://www.codeproject.com/aspnet/CPImageGallery.asp[^]
Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
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..
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();
-
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();
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
-
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