Home Forums SQL Server 2012 SQL 2012 - General Need to store .wav files out on disk, but the metadata should remain inside the database RE: Need to store .wav files out on disk, but the metadata should remain inside the database

  • I think you're overcomplicating the matter.

    There must be already some software which creates and/or saves the sound files in the file storage.

    Without it there would not be .wav files.

    So, your task in only to modify this software by adding a call to a DB procedure updating a record about the .wav file with its current location.

    Procedure should be very simple: update a record for a file by replacing the old location (1st parameted) with a new one (2nd parameter). If there is no record in DB which matches the 1st parameter (this includes the situation when 1st parameter is NULL) it creates a new record. If 2nd parameter is null it deletes a record matching the 1st parameter.

    If you cannot modify the application responsible for storing the file you can do it even with a simple SQLCMD command in a batch file.

    _____________
    Code for TallyGenerator