怎么能解决这个问题?

怎么能解决这个问题?

问题描述:

我的状态现在..

我有表格显示学生数据

和这个学生的照片

保存在数据库中的照片路径并将图像保存在文件夹中。好的

现在,当我要删除任何学生时,我想从文件夹中删除他的图像

怎么能这样做?



我尝试了什么:



我有托盘,但我删除的学生的图像不是从图像中删除的我该怎么办?

My state now ..
I have form to display student data
And photo for this student
The photo path saving in databass and the image save in folder . Ok
Now when i delet any student i want to delet his image from the folder
How can do this ?

What I have tried:

I had tray but the image for the student which i deleted dose not delet from the image what shall i do ?

如何:在Visual Basic中删除文件Microsoft Docs [ ^ ]


引用:

我有托盘,但我删除的学生的图像不能从图像中删除我该怎么办?

I had tray but the image for the student which i deleted dose not delet from the image what shall i do ?



因为你的代码错了,但你忘记了显示它。


Because your code is wrong, but you forgot to show it.

引用:

现在当我删除任何学生我想从文件夹中删除他的图像时/>
如何做到这一点?

Now when i delet any student i want to delet his image from the folder
How can do this ?



1)用照片路径/文件名读取学生记录

2)删除照片

3)删除学生记录


1) read student record with photo path/filename
2) delete photo
3) delete student record