Hello .. :)
Im on ma way completing my C# project,, but i have a small issue ..
let me tell you what it is ///
since its complicated to send the whole image to a db i only the send the image name to the database ( table )
FileInfo fn = new FileInfo(txtPath.Text); string p = txtPath.Text; int pos = p.LastIndexOf("."); string ext = p.Substring(pos + 1); string newname = mid + "." + ext; string path = StartPath + "\\images\\" + newname; fn.CopyTo(path);
The images are send to the folder IMAGES as you can see in the code.. nd every image is renamed to the primary key value, in here its MID when its adding .
receiving data its really fine..
but when i delete a record from the database using the C# form
only the image link get removed from the table ..
i have only two solutions in my mind,, once is to delete the image with the record removal or else can i when adding , can i overwrite existing images ? ?
in the above coding im only copying images and when a image exists with the same name the program gets confused . so in order to correct this what should i do.. ? Im waiting a reply from the experts ;)
Thanks in advance :)