•identifies most image formats and file types automatically•export unlimited images and files on demand•command line interface allows you to automate your export tasks•supports Access, Firebird, MySQL, Oracle, PostgreSQL, SQL Server, SQL Server Compact, SQLite, and ODBC data sources
The SQL Image Viewer Professional Edition license includes a command line interface (SQLImageViewerCmd.exe) you can use to automate your export tasks. Please see this page on how to set up an automated export task using the Windows Task Scheduler.When you set up the export settings in the GUI, the same query will be ran each time, and most likely the same data set(s) will be returned. SQL Image Viewer supports dynamic queries, where the SQL statement can be modified at run time.Let's use the following query as a starting point.
How to to export only new files and images in your scheduled export tasks (Professional Edition required)
Option 2 - provide a list of integer values from a fileYou do this using the <integerlist> tag. Say that you only want to export items with specific ProductPhotoIDvalues, and another application will provide this list of values. The requirement is that the application provides one value per line e.g.567589and stores this list in a file. For our example, let's assume the list is stored in the f:\export\list.txt file. You would then need to modify your SQL to the following:
Get started with SQL Image ViewerMake working with blobs easier - try SQL Image Viewer free for 14 days
Got a question?If you need help, or have any questions about SQL Image Viewer, please get in email@example.com
•identifies images and file types automatically•identify images and files stored in OLE Object columns•export embedded images to Excel spreadsheets•supports Access, Firebird, MySQL, Oracle, PostgreSQL, SQL Server, SQL Server Compact, SQLite, and ODBC data sources
View and export images and
files from your database with
SQL Image Viewer
Option 1 - provide a file that contains a SQL queryYou do this using the <file> tag. Instead of explicitly providing the SQL command to run, you can provide the name of a file that contains the SQL command to use. You can use this option when you have other applications that can dynamically generate the SQL command to use. Note that the query needs to contain any columns that you may have used to name the exported files.E.g. if your SQL command is stored in the f:\export\sql.txt file, you would modify the SQL to this:
When SQL ImageViewer runs the export, the SQL query it will run will contain the values from the file i.e.SELECT ProductPhotoID, LargePhoto FROM Production.ProductPhoto WHERE ProductPhotoID IN (56, 75, 89)To use a list of text values, use the <stringlist> tag e.g.
Note that each text value in the file need not be enclosed in single quotes.
Option 3 - use self-incrementing valuesIn situations where you have a column that auto-increments each time, and you only need to export new items, the SQL Image Viewer command line interface can maintain a file that contains the last processed value for you. That file can then be used as input to the SQL command.Assuming that ProductPhotoID is a self-incrementing value in our example. Say we only want to export new items each time the export runs. First, we need to modify the query to use the <integerlist> tag, to point to a file that will hold the last ProductPhotoID value.
We also need to ensure that our data set is ordered, so that the last record holds the latest ProductPhotoID value.
Next, we need to tell SQL Image Viewer that we want to store the last ProductPhotoID value in the f:\export\LastID.txt file. We do this by entering the values in the Stored values area.
Once you have saved your settings, you can test it by clicking on the Test settings button. SQL Image Viewer will run an export using the command line interface and the settings you have saved, and display the output.