Hello every one,
i have very big problem .. i have one database where i m saving the Image file's Path ... i want that i just want to insert one image file against of one student... if student has not photo then i can store diffrent image like (N/A).. one thing i would tell u for one student have only one image... same image could not save for diffrent student... so i m not getting how can solve it.. should i make PK of Path columns... let me know hope u understand what i want ...
thanks in Advance
Problem in Image file using c#
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Hirendra SisodiyaRank #258 · 9.8K reputationPosted Feb 23, 2010, 3:38 AM EST
"select count(*) from tableImage where imagepath ='"& path.trim() &"'"
if you get zero result than you can insert record otherwise this is duplicate.
Hirendra SisodiyaRank #258 · 9.8K reputationPosted Feb 23, 2010, 1:57 AM EST
You can make image path field as primary key --or--
simple you can check image path is already exist or not in your database, you can do this through simple query.
Naeem KhanRank #2,072 · 698 reputationPosted Feb 23, 2010, 3:27 AM EST
thanks for reply