Click here to Skip to main content
15,886,806 members
Home / Discussions / C#
   

C#

 
Questionurgent copy image from hard Drive on local host Pin
mavii19-Sep-07 22:56
mavii19-Sep-07 22:56 
AnswerRe: urgent copy image from hard Drive on local host Pin
Giorgi Dalakishvili19-Sep-07 23:21
mentorGiorgi Dalakishvili19-Sep-07 23:21 
GeneralRe: urgent copy image from hard Drive on local host Pin
mavii19-Sep-07 23:51
mavii19-Sep-07 23:51 
GeneralRe: urgent copy image from hard Drive on local host Pin
Pete O'Hanlon19-Sep-07 23:55
mvePete O'Hanlon19-Sep-07 23:55 
GeneralRe: urgent copy image from hard Drive on local host Pin
mavii20-Sep-07 0:35
mavii20-Sep-07 0:35 
GeneralRe: urgent copy image from hard Drive on local host Pin
pmarfleet20-Sep-07 1:13
pmarfleet20-Sep-07 1:13 
GeneralRe: urgent copy image from hard Drive on local host Pin
Pete O'Hanlon20-Sep-07 1:20
mvePete O'Hanlon20-Sep-07 1:20 
GeneralRe: urgent copy image from hard Drive on local host Pin
mavii21-Sep-07 1:01
mavii21-Sep-07 1:01 
string strQuery = "";
openFileDialog1.ShowDialog();
string s = openFileDialog1.FileName;
textBox6.Text = s;
st2 = s;
string st = "Pict" + Guid.NewGuid().ToString() + ".jpg";
File.Copy(openFileDialog1.FileName, Path.Combine(@"c:\inetpub\wwwroot\15 website\images", st));
strQuery = "INSERT INTO criminal(pic_name) VALUES('"+System.IO.Path.GetFileName(openFileDialog1.FileName)+"')";
SqlCommand com = new SqlCommand(strQuery, conn);
com.ExecuteNonQuery();

PROBLEM:
error comes on this the SQL Query , am i inserting rightly?
or there is some other way
Actually i want to insert only picture name of the picture to be browsed
can u plz suggest any solution
AnswerRe: urgent copy image from hard Drive on local host Pin
Malcolm Smart20-Sep-07 1:38
Malcolm Smart20-Sep-07 1:38 
Questionc++ equivalent of c# code Pin
tasumisra19-Sep-07 22:40
tasumisra19-Sep-07 22:40 
AnswerRe: c++ equivalent of c# code Pin
Christian Graus20-Sep-07 0:21
protectorChristian Graus20-Sep-07 0:21 
QuestionDo a check in a textBox Pin
lourensG19-Sep-07 22:13
lourensG19-Sep-07 22:13 
AnswerRe: Do a check in a textBox Pin
Giorgi Dalakishvili19-Sep-07 22:22
mentorGiorgi Dalakishvili19-Sep-07 22:22 
AnswerRe: Do a check in a textBox Pin
Martin#19-Sep-07 22:35
Martin#19-Sep-07 22:35 
AnswerRe: Do a check in a textBox Pin
Nouman Bhatti19-Sep-07 23:50
Nouman Bhatti19-Sep-07 23:50 
GeneralRe: Do a check in a textBox Pin
Martin#19-Sep-07 23:55
Martin#19-Sep-07 23:55 
GeneralRe: Do a check in a textBox Pin
lourensG20-Sep-07 0:08
lourensG20-Sep-07 0:08 
GeneralRe: Do a check in a textBox Pin
Martin#20-Sep-07 0:11
Martin#20-Sep-07 0:11 
AnswerRe: Do a check in a textBox Pin
Pete O'Hanlon20-Sep-07 0:02
mvePete O'Hanlon20-Sep-07 0:02 
GeneralRe: Do a check in a textBox Pin
lourensG20-Sep-07 0:31
lourensG20-Sep-07 0:31 
GeneralRe: Do a check in a textBox Pin
Pete O'Hanlon20-Sep-07 0:38
mvePete O'Hanlon20-Sep-07 0:38 
QuestionStream to Icon Pin
Michael Sync19-Sep-07 22:02
Michael Sync19-Sep-07 22:02 
AnswerRe: Stream to Icon Pin
Martin#19-Sep-07 22:23
Martin#19-Sep-07 22:23 
GeneralRe: Stream to Icon Pin
Michael Sync19-Sep-07 23:03
Michael Sync19-Sep-07 23:03 
AnswerRe: Stream to Icon Pin
J a a n s19-Sep-07 22:25
professionalJ a a n s19-Sep-07 22:25 

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.