Greetings All,
I am trying to parse a directory of images and reference a table in SQL to check if that image filename exists in the table. If not I'd like to INSERT it into a table (tbl_images) and if it does exist just ignore and move on.
Ideally I'd like to take it one step further in that if it finds a record that doesn't match a filename, that row is deleted or flagged for later review. For now I'd just like to get the INSERT working.
Because my DB is on a different server than the files I am using ASP to query the folder and pull contents. My thoughts are that I would take what ASP is pulling and insert it into a temporary table and then compare the two tables. Is this the best approach? I'm fairly new at database design/practices. Any suggestions or guidance is much appreciated.
I am trying to parse a directory of images and reference a table in SQL to check if that image filename exists in the table. If not I'd like to INSERT it into a table (tbl_images) and if it does exist just ignore and move on.
Ideally I'd like to take it one step further in that if it finds a record that doesn't match a filename, that row is deleted or flagged for later review. For now I'd just like to get the INSERT working.
Because my DB is on a different server than the files I am using ASP to query the folder and pull contents. My thoughts are that I would take what ASP is pulling and insert it into a temporary table and then compare the two tables. Is this the best approach? I'm fairly new at database design/practices. Any suggestions or guidance is much appreciated.
Comment