In some cases, users are unable to view attachments or add new attachments upgrading from CAREWare 5 to CAREWare 6. This can happen if the CAREWare database was moved to a new server.
To fix these issues, restore the cw_attachments database and create the database connection string for cw_attachments by following these instructions:
- Create a backup of the cw_attachments database from the CAREWare 5 database instance.
- Move the backup file to the SQL Server Restore from Directory or any file folder to which the CAREWare 6 SQL Server database instance has permission to read and write.
- Verify if the cw_attachments database has already been created by checking the database instance databases.
- Verify that the setting in CAREWare matches the current state by checking to see if attachmentDBCreated is one or zero.
If there is no cw_attachments database listed under databases and the setting for attachmentDBCreated = 1, then change that setting to 0. If there is a cw_attachments database and the attachmentDBCreated setting is 0, then change that setting to 1.
To change the attachmentDBCreated settings:
- Click Server Settings.
- Click Stop Server.
- Click Common Storage Settings.
- Click cmm_st_pk to set the list in alphabetical order.
- Go to attachmentDBCreated.
- Change the cmm_st_number to the needed setting: 0 or 1.
- Click Server Settings.
- Click Start Server.
If there was no cw_attachments database and the setting has been changed to zero, create the attachments database by adding an attachment record and then deleting that record. Once the attachment has been added to a client, the cw_attachments database should be created, the attachmentDCCreated setting should be set to 1, and the database connection string for cw_attachments should be created. Now the cw_attachments database can be restored.
To restore the cw_attachments database:
- Click Server Settings.
- Click Stop Server.
- Connect to CAREWare 6 database instance.
- Right click the database instance.
- Click Restart.
- Expand databases.
- Right click cw_attachments.
- Restore the cw_attachments database under tasks.
- Run this query: use cw_attachments Exec sp_changedbowner 'cwbt'
- Go back to the CW Admin.
- Click Start Server.
- Verify users can view and add attachments in CAREWare.