It has been a while since my last post. I have been busy writing my professional exams and starting with a new employer. While that means I no longer develop GP tools, I still have a couple projects I have not previously posted due to complexity but I feel some may be able to put it to use.
The tool is continuation from my automated batch attach addin. The previous addin allows users to attach files in bulk. This tool allows the user to browse the GP server for all attachments in the most used tables and download them (in bulk).
Some background first. The old OLD notes attachment feature was essentially a link to a network accessible file. The new document attach feature stores the file within the GP server itself. This means with simple SQL and c# code, you can perform a binary save to “download” or retrieve the file out of the server outside of the GP client. Since this can be done all within SQL, the user can filter based on any field within the database to locate a file.
Figure 1: Screenshot of Tool
The tool presumes you have read access to the GP server via your Windows authentication.
1. Type the name of the GP server in the “GP Server” box
2. Type the name of the GP database you wish to query in the “DB Name” box
3. (optional) Check off any filter boxes and input filter criteria
4. Hit “Refresh”
Assuming proper authentication, the tool will populate the datagrid with all of the attachments found (filtered down by any filters selected).
NOTE: This tool has minimal error trapping. Incorrect GP server or GP database names or other variables will more than likely crash the tool.
Link to tool: GPAttachments.zip
This was written in c# using SQL to query the database. If users wish, I will be willing to provide the SQL or c# sourcecode.
Disclaimer: I am very much an amateur programmer. I have never taken an official Microsoft course. I cannot guarantee any code/program that I provide as I only have the ability to test my work on a small sample set. Users accept all the risk of using anything I provide and are encouraged to thoroughly test in a dedicated test environment before moving to production. Files I provide are free for use and are not to be resold. By using my files you agree to not hold me liable for any damages caused by said files.