Click here to Skip to main content
15,906,276 members
Home / Discussions / C#
   

C#

 
QuestionGet list of exported functions from Unmanaged DLL Pin
Ronakkumar Patel8-Jun-07 5:57
Ronakkumar Patel8-Jun-07 5:57 
QuestionAlternative to Socket? Pin
Hamed Musavi8-Jun-07 5:50
Hamed Musavi8-Jun-07 5:50 
AnswerRe: Alternative to Socket? Pin
Not Active8-Jun-07 5:55
mentorNot Active8-Jun-07 5:55 
GeneralRe: Alternative to Socket? Pin
Hamed Musavi8-Jun-07 6:19
Hamed Musavi8-Jun-07 6:19 
AnswerRe: Alternative to Socket? Pin
Judah Gabriel Himango8-Jun-07 6:00
sponsorJudah Gabriel Himango8-Jun-07 6:00 
GeneralRe: Alternative to Socket? Pin
Hamed Musavi8-Jun-07 6:16
Hamed Musavi8-Jun-07 6:16 
QuestionIs WebProxy class only support HTTP proxy type? Pin
Ronakkumar Patel8-Jun-07 5:50
Ronakkumar Patel8-Jun-07 5:50 
QuestionImage's path Pin
Nine_8-Jun-07 4:34
Nine_8-Jun-07 4:34 
Hi all,
I'm working on a project using Visual Studio2005. I have saved an image path to the database. The code is something like this:
-----------------------------------------------
.
.
.


OpenFileDialog openImgFile = new OpenFileDialog();
if (openImgFile.ShowDialog() == DialogResult.OK)
{
imgPath= openImgFile.FileName;
pictureBox1.Image = Image.FromFile(imgPath);
}

cmdStr = "insert into img_tbl(imgID,imgPath)values('01',@path)";
cmd = new SqlCommand(cmdStr, cnn);
SqlParameter path = new SqlParameter("@path", SqlDbType.NVarChar, 225);
path.Value = imgPath;
cmd.Parameters.Add(path);
cmd.ExecuteNonQuery();
.
.
.
What I got from that is an image path storing in the database, something like this:
C:\Documents and Settings\Desktop\foto_311.jpg

But the problem is when I use this path to get an image to display on a form, it dosen't work!

If I change a little like this:
C:\\Documents and Settings\\Desktop\\foto_311.jpg
then it works.

So can anyone tell me how to change it before being saved?

Thankz

AnswerRe: Image's path Pin
Not Active8-Jun-07 4:53
mentorNot Active8-Jun-07 4:53 
GeneralRe: Image's path Pin
Nine_8-Jun-07 15:56
Nine_8-Jun-07 15:56 
GeneralRe: Image's path Pin
Not Active9-Jun-07 2:23
mentorNot Active9-Jun-07 2:23 
QuestionPrompt user to close outlook during install/uninstall Pin
Aerukull8-Jun-07 4:33
Aerukull8-Jun-07 4:33 
AnswerRe: Prompt user to close outlook during install/uninstall Pin
AikinX9-Jun-07 0:30
AikinX9-Jun-07 0:30 
QuestionIList and BindingSource Problem [modified] Pin
Wjousts8-Jun-07 3:42
Wjousts8-Jun-07 3:42 
AnswerRe: IList and BindingSource Problem Pin
Wjousts8-Jun-07 15:25
Wjousts8-Jun-07 15:25 
QuestionForm Application with Plugins via assembly loading Pin
ATCsharp8-Jun-07 2:47
ATCsharp8-Jun-07 2:47 
AnswerRe: Form Application with Plugins via assembly loading Pin
ATCsharp8-Jun-07 3:01
ATCsharp8-Jun-07 3:01 
GeneralRe: Form Application with Plugins via assembly loading Pin
Not Active8-Jun-07 3:12
mentorNot Active8-Jun-07 3:12 
GeneralRe: Form Application with Plugins via assembly loading Pin
ATCsharp8-Jun-07 3:23
ATCsharp8-Jun-07 3:23 
GeneralRe: Form Application with Plugins via assembly loading Pin
Not Active8-Jun-07 3:28
mentorNot Active8-Jun-07 3:28 
QuestionPlay MKV files in embedded media player Pin
sypack8-Jun-07 2:16
sypack8-Jun-07 2:16 
AnswerRe: Play MKV files in embedded media player Pin
Bekjong8-Jun-07 2:32
Bekjong8-Jun-07 2:32 
GeneralRe: Play MKV files in embedded media player Pin
sypack8-Jun-07 2:37
sypack8-Jun-07 2:37 
QuestionEncryption and Decryption Pin
M. J. Jaya Chitra8-Jun-07 2:15
M. J. Jaya Chitra8-Jun-07 2:15 
AnswerRe: Encryption and Decryption Pin
Sathesh Sakthivel8-Jun-07 2:19
Sathesh Sakthivel8-Jun-07 2:19 

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.