Click here to Skip to main content
16,004,778 members
Home / Discussions / C#
   

C#

 
AnswerRe: Socket send message Pin
Jimmanuel5-Dec-08 2:47
Jimmanuel5-Dec-08 2:47 
GeneralRe: Socket send message Pin
Mirko19805-Dec-08 2:57
Mirko19805-Dec-08 2:57 
AnswerRe: Socket send message Pin
Pr@teek B@h!5-Dec-08 3:27
Pr@teek B@h!5-Dec-08 3:27 
Questionworking with datetime picker Pin
prasadbuddhika4-Dec-08 23:48
prasadbuddhika4-Dec-08 23:48 
AnswerRe: working with datetime picker Pin
dan!sh 5-Dec-08 0:20
professional dan!sh 5-Dec-08 0:20 
QuestionRetriving the Blob data from data base and showing them in different format using dotnet Pin
shaik abdul gani4-Dec-08 22:56
shaik abdul gani4-Dec-08 22:56 
QuestionRe: Retriving the Blob data from data base and showing them in different format using dotnet Pin
Rajesh R Subramanian4-Dec-08 23:30
professionalRajesh R Subramanian4-Dec-08 23:30 
AnswerRe: Retriving the Blob data from data base and showing them in different format using dotnet Pin
shaik abdul gani10-Dec-08 23:01
shaik abdul gani10-Dec-08 23:01 
actually i want to open the file which is stored in the database in blob format.

i was able to save that perticular file into any of folders in the system

sample code is here.


string ATTACHEMENTID1 = "";
private void DgToolsList_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
ATTACHEMENTID1 = DgToolsList.Rows[e.RowIndex].Cells[0].Value.ToString();
string FileName = DgToolsList.Rows[e.RowIndex].Cells[1].Value.ToString();
if (e.ColumnIndex == 1)
{
saveFileDialog1.Title = "Open File";
saveFileDialog1.Filter = "All Files|*.*|JPEG Images|*.jpg|GIF Images|*.gif|BITMAPS|*.bmp";
saveFileDialog1.FileName = FileName.ToString();
saveFileDialog1.ShowDialog();
//txtAttachment.Text = openFileDialog1.FileName;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
byte[] buffer = GetFileFromDB(ATTACHEMENTID1);
int ArraySize = new int();
ArraySize = buffer.GetUpperBound(0);
FileStream fs1 = new FileStream(saveFileDialog1.FileName, FileMode.OpenOrCreate, FileAccess.Write);
fs1.Write(buffer, 0, ArraySize);
fs1.Close();
MessageBox.Show("File Save to " + saveFileDialog1.FileName);
}
}

}



GetFileFromDB(string atachmenet) is the method to read the blog data from the database


but i want to open the file directly istead of saving it and open it again.

please provide me with some solution for it .
AnswerRe: Retriving the Blob data from data base and showing them in different format using dotnet Pin
Ashfield5-Dec-08 1:18
Ashfield5-Dec-08 1:18 
GeneralRe: Retriving the Blob data from data base and showing them in different format using dotnet Pin
shaik abdul gani10-Dec-08 22:55
shaik abdul gani10-Dec-08 22:55 
GeneralRe: Retriving the Blob data from data base and showing them in different format using dotnet Pin
Ashfield11-Dec-08 1:54
Ashfield11-Dec-08 1:54 
GeneralRe: Retriving the Blob data from data base and showing them in different format using dotnet Pin
Wendelius5-Dec-08 8:47
mentorWendelius5-Dec-08 8:47 
QuestionConverting bytearray to string-> String returns boxes and question mark. Pin
meeram3954-Dec-08 22:33
meeram3954-Dec-08 22:33 
AnswerRe: Converting bytearray to string-> String returns boxes and question mark. Pin
SeMartens5-Dec-08 0:23
SeMartens5-Dec-08 0:23 
AnswerRe: Converting bytearray to string-> String returns boxes and question mark. Pin
Guffa5-Dec-08 2:14
Guffa5-Dec-08 2:14 
QuestionReflection - subclass identification [modified] Pin
devvvy4-Dec-08 22:03
devvvy4-Dec-08 22:03 
AnswerRe: Reflection - subclass identification Pin
Dave Kreskowiak5-Dec-08 4:01
mveDave Kreskowiak5-Dec-08 4:01 
GeneralRe: Reflection - subclass identification Pin
devvvy5-Dec-08 5:29
devvvy5-Dec-08 5:29 
GeneralRe: Reflection - subclass identification Pin
Dave Kreskowiak5-Dec-08 16:19
mveDave Kreskowiak5-Dec-08 16:19 
GeneralRe: Reflection - subclass identification Pin
devvvy5-Dec-08 16:51
devvvy5-Dec-08 16:51 
QuestionCookies don't get parsed in httpWebResponse Pin
Reiner S4-Dec-08 21:47
Reiner S4-Dec-08 21:47 
AnswerRe: Cookies don't get parsed in httpWebResponse Pin
Member 194676912-May-10 2:15
Member 194676912-May-10 2:15 
QuestionIf new drive detected.. an event happens Pin
Silvyster4-Dec-08 20:41
Silvyster4-Dec-08 20:41 
AnswerRe: If new drive detected.. an event happens Pin
TJS4u4-Dec-08 22:36
TJS4u4-Dec-08 22:36 
GeneralRe: If new drive detected.. an event happens Pin
Silvyster4-Dec-08 23:48
Silvyster4-Dec-08 23:48 

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.