I have sql database with table Images, in that table there are 2 Columns ID (identity), DisplayImage (image). Table has 2 rows for first row i have written

insert into Image values(1,'Libraries\Pictures\Lotus.jpg') and 2nd row as

INSERT INTO [dbo].[Image] ([Id],Images) SELECT 2, (select * FROM OPENROWSET(BULK 'C:\Users\Public\Pictures\Sample Pictures\Tulips.jpg', SINGLE_BLOB) AS BLOB)

Here is the code for reading the image

WebClient instanceHTTP = new WebClient();
Uri MyUri = new Uri("http://localhost:52293/WebSite/ImageHandler.ashx?ImageId=" + TextBox5.Text); //TextBox5.Text for id i.e 1 or 2 
Stream returnValue;
returnValue = instanceHTTP.OpenRead(MyUri);
System.Drawing.Image MyImage = System.Drawing.Image.FromStream(returnValue); // Error if id=1 used i.e normal insert 
bytearray = imageToByteArray(MyImage);  
MyImage.Dispose(); 

if i use id 1 that is normal insert than it gives error that invalid Parmeter but if i use id 2 it runs properly. So what is the difference?? and what changes i have to make in order to runn normal insert image.. I dont want to use AS BLOB in insert statement

Hi JorgeM,

Your code is perfect but i want that image should come from image Handler i.e .ashx file..
Specifying an image name will always send the same image.

I am using this for the internal mails i.e outlook. The main issue is that if i send image using .ashx file than on receiving the email user has to download the image in order to view the image in this case if server is closed image wont be visible and if i directly send the image as you specified than it will be display directly but not different everytime.

So in short i want differnt image everytime using imageHandler.ashx and it should visible directly to the user without downloading..

How to retrive Image from DB Using and handler and Embed that image in Email, so that in future if image in DB changes so it should not affect to image which has been Mailed earlier

I am creating a website where i want to send email notification of every website activity like Facebook
How can i send automatic emails to logged in user?

Thank You.

Hello,
How to show search results from Database WITHOUT Gridview.
I am making property dealing site in which when user seraches the property the results should come on the webform not in a gridview control How can i acheive this???

Hello,
How to write Code into Hyperlink of datagridviewcell
I have a datagridview which is connected to the database and data is coming from the database than how to write code inside the hyperlink???

Means as irctc site were user fills all the details on first page and when he clicks on next at that time all train details entered is saved in viewstate so that on next page fare is automaticaly calculated according to train selected and class and stations.

Hi,
Please someone explain me what is viewstate and postback properties in simple words. I have sean many notes but still confused. Please explain with example and considering me as totaly new to IT (actually i am not). Please help i am very confused. Thank you.

Hi,
I am confused between razor and asp.net coding. Asp.net code itself is a server side code so why it is said that razor code is server side embedding code for creating dynamic web pages? Normal asp.net code also runs at server side so what is the need for razor than?

Yes i also understand that
loops are for convienance. That make work easy, while this is increasing burden.

In Java we don't have operator overloading. We have function overloading

@WaltP:
i am not saying that if java does not support than c# should not. I mean to say is java has eliminated the concept of operator overloading and than too we don't need any operator overloading there. So, why we use it here? Well, i think operator overloading is required when we want to do some operation by creating more than one class objects so that it becomes easy to pass data to function. An i right?

Overloading an operator is overhead.
Means in totality there is no actual use.

But we can do these without overloading also. Java do not support operator overloading so why to do in c++ and c#? I am not getting the actual usage.

What is the need for operator overloading?

@LP
My code exactly as you have given. Instead of DataDirectory i have written F: \dbname.mdb. But i didn't get you.

Ok thank you so much hericles

Thanks hericles its working.
All i have done is instead of writing DataGridViewTextBoxColumn i have written DataGridViewColumn. And DataGridViewColumn's obj.CellTemplate = new DataGridViewTextBoxCell(); because DataGridViewTextBoxColumn do not have DataPropertyName property.
Thank you your link was helpfull

And other columns i am binding with other labels so thats why i have to do * option.

Actuly i can write only required column name but my query is parameterized and cloumn which i am using for parameter that i dont wont to display

How to bind selected columns to datagridview at runtime.
I have written select * from tableName. And result i have stored in DataTable dt. Now i want only selected columns to be displayed in datagridview at runtime. I dont want to bound gridview at designtime.

Ya its EE

I have installed full netbeanas6.0 with jdk1.7

Netbeans 6.0.1 and java 1.5 and 1.7.
Which should i use with neatbeans?

It only shows red line. Ane message "symbol not found"
@Remote
It is predfined annotation

Hi,
i have netbeans 6.0.1 but when i just creat a file it gives error even at the line which comes by default. For example @Remote or javax.ejb i have uninstalled and installed it again than to the previous installtion effects remains as it is.

Supposean giving may application's setup file to any user for his use and he is a non technical person than if he install app than to he has to dump database file in his pc? Even if he dont know what is database? Or is it like that when a person installing application database file should get store automatically in program file folder

Ok. Hericles. I have one more doubt, after making setup of the project is database location matters? How to attach that database file while making setup?

@mikey i know u r not silly my intension was not wrong to tell u that. I thought bymstkly u wld have typd wrong spelling.
Sorry if u hurt n thnx for d help.

Thanx momerath. It works.
I have used
if(txtPassword.Text.CompareTo("pwd frm db")==0)
than allow login.
Thank u