Click here to Skip to main content
15,921,531 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can i change Windows Form in real time Pin
whizzs28-Oct-05 8:04
whizzs28-Oct-05 8:04 
AnswerRe: How can i change Windows Form in real time Pin
Dan Neely28-Oct-05 8:08
Dan Neely28-Oct-05 8:08 
QuestionReplacing in .NET Pin
Dwayner7928-Oct-05 5:24
Dwayner7928-Oct-05 5:24 
AnswerRe: Replacing in .NET Pin
Jon Sagara28-Oct-05 6:52
Jon Sagara28-Oct-05 6:52 
GeneralRe: Replacing in .NET Pin
Dwayner7928-Oct-05 7:13
Dwayner7928-Oct-05 7:13 
GeneralRe: Replacing in .NET Pin
Jon Sagara28-Oct-05 7:17
Jon Sagara28-Oct-05 7:17 
AnswerRe: Replacing in .NET Pin
Guffa29-Oct-05 1:18
Guffa29-Oct-05 1:18 
QuestionPDF File open Issue Pin
sreeni221928-Oct-05 5:06
sreeni221928-Oct-05 5:06 
I have stored my PDF files in the database as binary code.
Now i want to retriee the the binay format file and want to display to my user.
But when ever i have tried the file is not visible. Why? Any help..
Your help highly appriciated!I have written below code..

Basically i want to show the report to the user, I like to store in memory rather physically storing the report in hard drive.
Or do we have any better way to display the report to my user from database (But constraint is File should show in PDF format only!)



string strString= "Select Image From ImageTable where ID=1"
SqlConnection connection = new SqlConnection(connectionstring);
connection.Open();
SqlDataAdapter da = new SqlDataAdapter(strSpName, connection);
da.SelectCommand.CommandType = CommandType.Text;

DataSet ds = new DataSet();

// Fill dataset
da.Fill(ds,"Image");

if (ds.Tables[0].Rows.Count > 0)

{

byte[] Myimage= new byte[0];
DataRow dr;
dr=ds.Tables["Image"].Rows[0];

Myimage = (byte[])dr["NoticeImage"];
int ArraySize = new int();
ArraySize = Myimage.GetUpperBound(0);

FileStream fs = new FileStream(@"C:\Temp\image.pdf", FileMode.OpenOrCreate, FileAccess.Write);
fs.Write(Myimage, 0,ArraySize);
fs.Flush();
fs.Close();
File.Open(@"C:\Temp\image.pdf", FileMode.Open);


}
AnswerRe: PDF File open Issue Pin
KaptinKrunch28-Oct-05 5:11
KaptinKrunch28-Oct-05 5:11 
GeneralRe: PDF File open Issue Pin
sreeni221928-Oct-05 5:25
sreeni221928-Oct-05 5:25 
GeneralRe: PDF File open Issue Pin
KaptinKrunch28-Oct-05 5:56
KaptinKrunch28-Oct-05 5:56 
AnswerRe: PDF File open Issue Pin
snouto28-Oct-05 12:52
snouto28-Oct-05 12:52 
QuestionWeird problem with Label[]. Pin
Green Fuze28-Oct-05 4:49
Green Fuze28-Oct-05 4:49 
AnswerRe: Weird problem with Label[]. Pin
KaptinKrunch28-Oct-05 5:07
KaptinKrunch28-Oct-05 5:07 
GeneralRe: Weird problem with Label[]. Pin
Green Fuze28-Oct-05 6:05
Green Fuze28-Oct-05 6:05 
AnswerRe: Weird problem with Label[]. Pin
IdUnknown28-Oct-05 7:46
IdUnknown28-Oct-05 7:46 
GeneralRe: Weird problem with Label[]. Pin
Green Fuze28-Oct-05 11:48
Green Fuze28-Oct-05 11:48 
QuestionMessageBox.Show() Causing Error Pin
Michele@MERC28-Oct-05 4:46
Michele@MERC28-Oct-05 4:46 
AnswerRe: MessageBox.Show() Causing Error Pin
KaptinKrunch28-Oct-05 4:51
KaptinKrunch28-Oct-05 4:51 
GeneralRe: MessageBox.Show() Causing Error Pin
Michele@MERC31-Oct-05 2:24
Michele@MERC31-Oct-05 2:24 
QuestionWanted: Calender Control Pin
Gavin Roberts28-Oct-05 4:22
Gavin Roberts28-Oct-05 4:22 
AnswerRe: Wanted: Calender Control Pin
AETaylor31-Oct-05 2:51
AETaylor31-Oct-05 2:51 
QuestionModerating Posting Messages Pin
Asare28-Oct-05 3:46
Asare28-Oct-05 3:46 
AnswerRe: Moderating Posting Messages Pin
Dan Neely28-Oct-05 4:06
Dan Neely28-Oct-05 4:06 
GeneralRe: Moderating Posting Messages--an email list server Pin
Asare28-Oct-05 9:14
Asare28-Oct-05 9:14 

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.