locked
Cant open symmetric key RRS feed

  • Question

  • Hi I have visual basic app that used one coneection. To avoid data reader conflicts i created another connection for fetching data in background. But the problem is that although i ezecute query that opens symmetric key in both connections. The other connection (they both use same login) doesnt open symmetric key and i cant get data i need (cuz it just returns DBNull). Is it even possible to open the same symmetric key for two conections at the same time that use the same login? Thanks in advance!
    Cheers!
    Thursday, November 12, 2009 1:24 AM

Answers

  • As per my understanding , at a time only one session can access data from an opened symmetry key .
    Also to note is the session which opened the key will only be able to read data and An open key will continue to be available until it is either explicitly closed or the session is terminated.

    The second / third or consecutive open key will be success but not be able to read data. It will give us NULL output as you said.

    BOOKS ONLINE says - If the symmetric key is already open, the query is a NO_OP.


    Thanks, Leks
    Thursday, November 12, 2009 2:38 AM