This project has moved and is read-only. For the latest updates, please go here.

v3.2 Database store - "Unable to save connection history. Database connection lost." on "Connect" to RDP

Topics: Developer Forum
Aug 8, 2013 at 12:08 AM
Edited Aug 8, 2013 at 12:45 AM
The Terminals Program then requests Retry or Exit.

SQL Profiler reveals:
RPC:Starting|exec [dbo].[GetFavoriteIcon] @FavoriteId=6|TERMINALS|.\SQLEXPRESS
RPC:Completed|exec [dbo].[GetFavoriteIcon] @FavoriteId=6|TERMINALS|.\SQLEXPRESS
RPC:Starting|exec sp_reset_connection |TERMINALS|.\SQLEXPRESS
RPC:Completed|exec sp_reset_connection |TERMINALS|.\SQLEXPRESS
RPC:Starting|exec [dbo].[InsertHistory] @FavoriteId=0,@Date='2013-08-07 22:41:44.9800277',@UserSid=N'S-1-5-21-47451956-1416394668-747008748-27558'|TERMINALS|.\SQLEXPRESS
User Error Message|The INSERT statement conflicted with the FOREIGN KEY constraint "FK_History_Favorites". The conflict occurred in database "TERMINALS", table "dbo.Favorites", column 'Id'.|TERMINALS|.\SQLEXPRESS
With the assumed error to be @FavoriteId=6 passing through to exec [dbo].[InsertHistory] as @FavoriteId=0

By disabling the FOREIGN KEY constraint in the History table, I am able to connect and the history is logged as @FavoriteId=0 for every connection.

Aug 8, 2013 at 4:21 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.